diff --git a/Assets/Fungus/Lua.meta b/Assets/Fungus/Lua.meta new file mode 100644 index 00000000..57284f07 --- /dev/null +++ b/Assets/Fungus/Lua.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: eb9106aaabbf94f978cec3f7bf29790e +folderAsset: yes +timeCreated: 1459937141 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Lua/Scripts.meta b/Assets/Fungus/Lua/Scripts.meta new file mode 100644 index 00000000..dbc4914e --- /dev/null +++ b/Assets/Fungus/Lua/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 927b2ce96300f4cb093db15b56750d0c +folderAsset: yes +timeCreated: 1459937186 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FungusLua/Scripts/Commands.meta b/Assets/Fungus/Lua/Scripts/Commands.meta similarity index 100% rename from Assets/FungusLua/Scripts/Commands.meta rename to Assets/Fungus/Lua/Scripts/Commands.meta diff --git a/Assets/FungusLua/Scripts/Commands/ExecuteLua.cs b/Assets/Fungus/Lua/Scripts/Commands/ExecuteLua.cs similarity index 100% rename from Assets/FungusLua/Scripts/Commands/ExecuteLua.cs rename to Assets/Fungus/Lua/Scripts/Commands/ExecuteLua.cs diff --git a/Assets/FungusLua/Scripts/Commands/ExecuteLua.cs.meta b/Assets/Fungus/Lua/Scripts/Commands/ExecuteLua.cs.meta similarity index 100% rename from Assets/FungusLua/Scripts/Commands/ExecuteLua.cs.meta rename to Assets/Fungus/Lua/Scripts/Commands/ExecuteLua.cs.meta diff --git a/Assets/FungusLua/Scripts/LuaExtensions.cs b/Assets/Fungus/Lua/Scripts/LuaExtensions.cs similarity index 100% rename from Assets/FungusLua/Scripts/LuaExtensions.cs rename to Assets/Fungus/Lua/Scripts/LuaExtensions.cs diff --git a/Assets/FungusLua/Scripts/LuaExtensions.cs.meta b/Assets/Fungus/Lua/Scripts/LuaExtensions.cs.meta similarity index 100% rename from Assets/FungusLua/Scripts/LuaExtensions.cs.meta rename to Assets/Fungus/Lua/Scripts/LuaExtensions.cs.meta diff --git a/Assets/FungusLua/Resources/Lua/fungus.txt b/Assets/FungusLua/Resources/Lua/fungus.txt index d10e3fe5..0c4e9091 100644 --- a/Assets/FungusLua/Resources/Lua/fungus.txt +++ b/Assets/FungusLua/Resources/Lua/fungus.txt @@ -106,9 +106,10 @@ function M.sub(text) return M.luautils.substitute(text) end --------------------- +-------------------------------------------------------------- -- Integration tests --------------------- +-- These functions require the Unity Test Tools to work. +-------------------------------------------------------------- -- Checks if a condition is true (requires Unity Test Tools) -- Lua has a built in assert function, so we called this check to avoid conflicting. @@ -131,6 +132,10 @@ function M.fail(reason) M.test.fail(reason) end +--------------------------------------------- +-- All functions below require Fungus to work +--------------------------------------------- + ------------- -- Say Dialog ------------- diff --git a/Assets/FungusLua/Resources/Types/FungusTypes.txt b/Assets/FungusLua/Resources/Types/FungusTypes.txt new file mode 100644 index 00000000..69f519cb --- /dev/null +++ b/Assets/FungusLua/Resources/Types/FungusTypes.txt @@ -0,0 +1,43 @@ +# List of c# types to register with MoonSharp +# LuaBindings usually takes care of registering the types of bound objects, but in some +# cases you'll need to register a type manually by adding it to this list. +# You can also register types using MoonSharp's UserData class in the Awake method of a component. +# To register an extension type, add the E: prefix +# If the type is defined in the main assembly then you can just use namespace.typename +# If the type is defined in any other assembly you need to use the full assembly qualified type name. + +Fungus.AnimatorVariable +Fungus.AudioSourceVariable +Fungus.Block +Fungus.BooleanVariable +Fungus.Character +Fungus.ColorVariable +Fungus.Command +Fungus.CommandInfoAttribute +Fungus.FacingDirection +Fungus.FloatVariable +Fungus.Flowchart +Fungus.FungusPrefs +Fungus.LuaEnvironment +Fungus.LuaUtils +Fungus.GameObjectVariable +Fungus.IntegerVariable +Fungus.Label +Fungus.MaterialVariable +Fungus.MenuDialog +Fungus.ObjectVariable +Fungus.PODTypeFactory +Fungus.PortraitState +Fungus.SayDialog +Fungus.SpriteVariable +Fungus.StringVariable +Fungus.Task +Fungus.TextureVariable +Fungus.TransformVariable +Fungus.Variable +Fungus.Vector2Variable +Fungus.Vector3Variable + +# Extension types + +E:Fungus.LuaExtensions diff --git a/Assets/FungusLua/Resources/Types/FungusTypes.txt.meta b/Assets/FungusLua/Resources/Types/FungusTypes.txt.meta new file mode 100644 index 00000000..f34aaa38 --- /dev/null +++ b/Assets/FungusLua/Resources/Types/FungusTypes.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 93fddea8208764a2dbb189cc238aed40 +timeCreated: 1459937246 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FungusLua/Resources/Types/RegisterTypes.txt b/Assets/FungusLua/Resources/Types/UnityTypes.txt similarity index 89% rename from Assets/FungusLua/Resources/Types/RegisterTypes.txt rename to Assets/FungusLua/Resources/Types/UnityTypes.txt index 1478c827..1d10e589 100644 --- a/Assets/FungusLua/Resources/Types/RegisterTypes.txt +++ b/Assets/FungusLua/Resources/Types/UnityTypes.txt @@ -6,37 +6,6 @@ # If the type is defined in the main assembly then you can just use namespace.typename # If the type is defined in any other assembly you need to use the full assembly qualified type name. -Fungus.AnimatorVariable -Fungus.AudioSourceVariable -Fungus.Block -Fungus.BooleanVariable -Fungus.Character -Fungus.ColorVariable -Fungus.Command -Fungus.CommandInfoAttribute -Fungus.FacingDirection -Fungus.FloatVariable -Fungus.Flowchart -Fungus.FungusPrefs -Fungus.LuaEnvironment -Fungus.LuaUtils -Fungus.GameObjectVariable -Fungus.IntegerVariable -Fungus.Label -Fungus.MaterialVariable -Fungus.MenuDialog -Fungus.ObjectVariable -Fungus.PODTypeFactory -Fungus.PortraitState -Fungus.SayDialog -Fungus.SpriteVariable -Fungus.StringVariable -Fungus.Task -Fungus.TextureVariable -Fungus.TransformVariable -Fungus.Variable -Fungus.Vector2Variable -Fungus.Vector3Variable System.Action, System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Collections.IEnumerator, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -96,5 +65,3 @@ UnityEngine.Vector4, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyTok UnityEngine.VerticalWrapMode, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null # Extension types - -E:Fungus.LuaExtensions diff --git a/Assets/FungusLua/Resources/Types/RegisterTypes.txt.meta b/Assets/FungusLua/Resources/Types/UnityTypes.txt.meta similarity index 100% rename from Assets/FungusLua/Resources/Types/RegisterTypes.txt.meta rename to Assets/FungusLua/Resources/Types/UnityTypes.txt.meta diff --git a/Assets/Tests/Lua/FungusTests.unity b/Assets/Tests/Lua/FungusTests.unity index 72765174..5d7d6d7a 100644 --- a/Assets/Tests/Lua/FungusTests.unity +++ b/Assets/Tests/Lua/FungusTests.unity @@ -955,7 +955,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &110417826 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2232,66 +2232,10 @@ CanvasRenderer: type: 2} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 330161927} ---- !u!1 &375366499 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 100640, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 375366500} - - 114: {fileID: 375366502} - - 114: {fileID: 375366501} - m_Layer: 0 - m_Name: LuaEnvironment - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &375366500 +--- !u!4 &375366500 stripped Transform: - m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 375366499} - 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: 110417827} - m_RootOrder: 1 ---- !u!114 &375366501 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11486636, guid: 49031c561e16d4fcf91c12153f8e0b25, - type: 2} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 375366499} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c10f0b861365b42b0928858f7b086ff3, type: 3} - m_Name: - m_EditorClassIdentifier: - fungusModule: 0 - stringTable: {fileID: 0} - activeLanguage: en - timeScale: -1 - registerTypes: - - {fileID: 4900000, guid: 9c3ab7a98d51241bbb499643399fa761, type: 3} ---- !u!114 &375366502 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 11493126, guid: 49031c561e16d4fcf91c12153f8e0b25, - type: 2} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 375366499} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ba19c26c1ba7243d2b57ebc4329cc7c6, type: 3} - m_Name: - m_EditorClassIdentifier: - remoteDebugger: 0 + m_PrefabInternal: {fileID: 1880272195} --- !u!1 &398057887 GameObject: m_ObjectHideFlags: 0 @@ -7620,7 +7564,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &1641285457 MonoBehaviour: m_ObjectHideFlags: 0 @@ -8989,6 +8933,48 @@ CanvasRenderer: type: 2} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1880266302} +--- !u!1001 &1880272195 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 110417827} + m_Modifications: + - target: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} + m_IsPrefabParent: 0 --- !u!1 &1900092124 GameObject: m_ObjectHideFlags: 0