Browse Source

Added all-in-one Lua prefab

master
Chris Gregan 9 years ago
parent
commit
7c7897fa68
  1. 127
      Assets/Fungus/Thirdparty/FungusLua/Resources/Prefabs/Lua.prefab
  2. 8
      Assets/Fungus/Thirdparty/FungusLua/Resources/Prefabs/Lua.prefab.meta
  3. 50
      Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/MenuItems.cs

127
Assets/Fungus/Thirdparty/FungusLua/Resources/Prefabs/Lua.prefab vendored

@ -0,0 +1,127 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &179118
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 466848}
- 114: {fileID: 11415008}
- 114: {fileID: 11417560}
- 114: {fileID: 11499092}
- 114: {fileID: 11483650}
- 114: {fileID: 11437776}
m_Layer: 0
m_Name: Lua
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &466848
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 179118}
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 &11415008
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 179118}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6ee79785811ba49399c1b56d7309e3df, type: 3}
m_Name:
m_EditorClassIdentifier:
executeAfterTime: 1
repeatExecuteTime: 1
repeatEveryTime: 1
executeAfterFrames: 1
repeatExecuteFrame: 1
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
executeMethodName: OnExecute
--- !u!114 &11417560
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 179118}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 446caeace65234baaacd52095d24f101, type: 3}
m_Name:
m_EditorClassIdentifier:
luaEnvironment: {fileID: 11483650}
luaFile: {fileID: 0}
luaScript:
runAsCoroutine: 1
--- !u!114 &11437776
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 179118}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c10f0b861365b42b0928858f7b086ff3, type: 3}
m_Name:
m_EditorClassIdentifier:
fungusModule: 0
activeLanguage: en
stringTables: []
registerTypes:
- {fileID: 4900000, guid: 9c3ab7a98d51241bbb499643399fa761, type: 3}
- {fileID: 4900000, guid: 93fddea8208764a2dbb189cc238aed40, type: 3}
--- !u!114 &11483650
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 179118}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ba19c26c1ba7243d2b57ebc4329cc7c6, type: 3}
m_Name:
m_EditorClassIdentifier:
remoteDebugger: 0
--- !u!114 &11499092
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 179118}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4cc8a659e950044b69d7c62696c36962, type: 3}
m_Name:
m_EditorClassIdentifier:
tableName:
registerTypes: 1
boundTypes: []
boundObjects:
- key:
obj: {fileID: 0}
component: {fileID: 0}
--- !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: 179118}
m_IsPrefabParent: 1

8
Assets/Fungus/Thirdparty/FungusLua/Resources/Prefabs/Lua.prefab.meta vendored

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3ddf9f33ba98e4b31ba4d2b9722bea00
timeCreated: 1462457182
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

50
Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/MenuItems.cs vendored

@ -8,31 +8,13 @@ namespace Fungus
public class MenuItems public class MenuItems
{ {
[MenuItem("Tools/Fungus/Create/Lua Environment", false, 2000)] [MenuItem("Tools/Fungus/Create/Lua", false, 2000)]
static void CreateLuaEnvironment() static void CreateLua()
{ {
SpawnPrefab("Prefabs/LuaEnvironment", false); SpawnPrefab("Prefabs/Lua", false);
}
[MenuItem("Tools/Fungus/Create/Lua Bindings", false, 2001)]
static void CreateLuaBindings()
{
SpawnPrefab("Prefabs/LuaBindings", false);
} }
[MenuItem("Tools/Fungus/Create/Lua Script", false, 2002)] [MenuItem("Tools/Fungus/Create/Lua File", false, 2001)]
static void CreateLuaScript()
{
SpawnPrefab("Prefabs/LuaScript", false);
}
[MenuItem("Tools/Fungus/Create/Lua Store", false, 2003)]
static void CreateLuaStore()
{
SpawnPrefab("Prefabs/LuaStore", false);
}
[MenuItem("Tools/Fungus/Create/Lua File", false, 2100)]
static void CreateLuaFile() static void CreateLuaFile()
{ {
string path = EditorUtility.SaveFilePanelInProject("Create Lua File", "script.txt", "txt", "Please select a file name for the new Lua script. Note: Lua files in Unity use the .txt extension."); string path = EditorUtility.SaveFilePanelInProject("Create Lua File", "script.txt", "txt", "Please select a file name for the new Lua script. Note: Lua files in Unity use the .txt extension.");
@ -56,6 +38,30 @@ namespace Fungus
} }
} }
[MenuItem("Tools/Fungus/Create/Lua Environment", false, 2100)]
static void CreateLuaEnvironment()
{
SpawnPrefab("Prefabs/LuaEnvironment", false);
}
[MenuItem("Tools/Fungus/Create/Lua Bindings", false, 2101)]
static void CreateLuaBindings()
{
SpawnPrefab("Prefabs/LuaBindings", false);
}
[MenuItem("Tools/Fungus/Create/Lua Script", false, 2102)]
static void CreateLuaScript()
{
SpawnPrefab("Prefabs/LuaScript", false);
}
[MenuItem("Tools/Fungus/Create/Lua Store", false, 2103)]
static void CreateLuaStore()
{
SpawnPrefab("Prefabs/LuaStore", false);
}
/// <summary> /// <summary>
/// Spawns a prefab in the scene based on it's filename in a Resources folder in the project. /// Spawns a prefab in the scene based on it's filename in a Resources folder in the project.
/// If centerInScene is true then the object will be placed centered in the view window with z = 0. /// If centerInScene is true then the object will be placed centered in the view window with z = 0.

Loading…
Cancel
Save