diff --git a/Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs b/Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs index b2fb9452..1417bd59 100644 --- a/Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs +++ b/Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs @@ -50,6 +50,12 @@ namespace Fungus AssetDatabase.ExportPackage(folders, path, ExportPackageOptions.Recurse); } + [MenuItem("Tools/Fungus/Utilities/Info Text")] + static void SpawnInfoText() + { + SpawnPrefab("InfoText"); + } + public static GameObject SpawnPrefab(string prefabName) { GameObject prefab = Resources.Load(prefabName); diff --git a/Assets/Fungus/Flowchart/Resources/InfoText.prefab b/Assets/Fungus/Flowchart/Resources/InfoText.prefab new file mode 100644 index 00000000..0fd9a8f8 --- /dev/null +++ b/Assets/Fungus/Flowchart/Resources/InfoText.prefab @@ -0,0 +1,53 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &105822 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 438292} + - 114: {fileID: 11442554} + m_Layer: 0 + m_Name: InfoText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &438292 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 105822} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!114 &11442554 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 105822} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8c0cbb63e218a4414a796a60ffe37dd3, type: 3} + m_Name: + m_EditorClassIdentifier: + info: Information text +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 105822} + m_IsPrefabParent: 1 diff --git a/Assets/Fungus/Flowchart/Resources/InfoText.prefab.meta b/Assets/Fungus/Flowchart/Resources/InfoText.prefab.meta new file mode 100644 index 00000000..232408c7 --- /dev/null +++ b/Assets/Fungus/Flowchart/Resources/InfoText.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d6f174e740b5040c68466fb971c4cec2 +timeCreated: 1462775608 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt b/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt index 036fcda4..00838920 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt +++ b/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt @@ -259,7 +259,6 @@ end -- varname: The name of the Variable to get. function M.getvar(flowchart, varname) assert(flowchart, "flowchart must not be nil") - assert(blockname, "varname must not be nil") return flowchart.GetVariable(varname) end