Browse Source

Added InforText to Fungus utilities menu

master
Chris Gregan 9 years ago
parent
commit
d26a3ea08c
  1. 6
      Assets/Fungus/Flowchart/Editor/FlowchartMenuItems.cs
  2. 53
      Assets/Fungus/Flowchart/Resources/InfoText.prefab
  3. 8
      Assets/Fungus/Flowchart/Resources/InfoText.prefab.meta
  4. 1
      Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt

6
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<GameObject>(prefabName);

53
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

8
Assets/Fungus/Flowchart/Resources/InfoText.prefab.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d6f174e740b5040c68466fb971c4cec2
timeCreated: 1462775608
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

1
Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt vendored

@ -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

Loading…
Cancel
Save