diff --git a/Assets/Fungus/FungusScript.meta b/Assets/Fungus/Lua.meta
similarity index 100%
rename from Assets/Fungus/FungusScript.meta
rename to Assets/Fungus/Lua.meta
diff --git a/Assets/Fungus/FungusScript/Resources.meta b/Assets/Fungus/Lua/Resources.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Resources.meta
rename to Assets/Fungus/Lua/Resources.meta
diff --git a/Assets/Fungus/FungusScript/Resources/Lua.meta b/Assets/Fungus/Lua/Resources/Lua.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Resources/Lua.meta
rename to Assets/Fungus/Lua/Resources/Lua.meta
diff --git a/Assets/Fungus/FungusScript/Resources/Lua/fungus.txt b/Assets/Fungus/Lua/Resources/Lua/fungus.txt
similarity index 90%
rename from Assets/Fungus/FungusScript/Resources/Lua/fungus.txt
rename to Assets/Fungus/Lua/Resources/Lua/fungus.txt
index 16a2df47..60b3a400 100644
--- a/Assets/Fungus/FungusScript/Resources/Lua/fungus.txt
+++ b/Assets/Fungus/Lua/Resources/Lua/fungus.txt
@@ -16,15 +16,15 @@ end
-------
-- Returns the absolute time
--- Use this timing function to work correctly with the FungusScript timeScale property
+-- Use this timing function to work correctly with the Lua component's timeScale property
function M.time()
- return unity.fungusscript.getTime()
+ return unity.lua.getTime()
end
-- Returns the delta time this frame
--- Use this timing function to work correctly with the FungusScript timeScale property
+-- Use this timing function to work correctly with the Lua component's timeScale property
function M.deltatime()
- return unity.fungusscript.getDeltaTime()
+ return unity.lua.getDeltaTime()
end
-------------
@@ -57,7 +57,7 @@ end
function M.run(enumerator)
-- If the parameter isn't an enumerator then CreateTask will fail
local status, err = pcall( function()
- local task = unity.fungusscript.RunUnityCoroutine(enumerator)
+ local task = unity.lua.RunUnityCoroutine(enumerator)
end)
if (not status) then
@@ -70,7 +70,7 @@ end
function M.runwait(enumerator)
-- If the parameter isn't an enumerator then CreateTask will fail
local status, err = pcall( function()
- local task = unity.fungusscript.RunUnityCoroutine(enumerator)
+ local task = unity.lua.RunUnityCoroutine(enumerator)
while (task != nil and task.Running) do
coroutine.yield();
end
@@ -88,18 +88,18 @@ end
-- Set active language for string table
function M.setlanguage(languageCode)
- unity.fungusscript.activeLanguage = languageCode
+ unity.lua.activeLanguage = languageCode
end
-- Get a named string from the string table
function M.getstring(key)
- return unity.fungusscript.GetString(key)
+ return unity.lua.GetString(key)
end
-- Substitutes variables and localisation strings into a piece of text
-- e.g. v = 10, "Subbed value is [$v]" => "Subbed value is 10"
function M.sub(text)
- return unity.fungusscript.substitute(text)
+ return unity.lua.substitute(text)
end
--------------------
@@ -211,7 +211,7 @@ function M.menu(text, callback, interactive)
-- Do variable substitution before displaying text
local subbed = fungus.sub(text)
- M.menuoptions.menudialog.AddOption(subbed, interactive or true, unity.fungusscript, callback)
+ M.menuoptions.menudialog.AddOption(subbed, interactive or true, unity.lua, callback)
end
-- Display a timer during which the player has to choose an option.
@@ -219,7 +219,7 @@ end
-- callback: Function to call if the timer expires before an option is selected.
function M.menutimer(duration, callback)
assert(M.menuoptions.menudialog, "menudialog must not be nil")
- local e = M.menuoptions.menudialog.ShowTimer(duration, unity.fungusscript, callback)
+ local e = M.menuoptions.menudialog.ShowTimer(duration, unity.lua, callback)
fungus.runwait(e)
end
diff --git a/Assets/Fungus/FungusScript/Resources/Lua/fungus.txt.meta b/Assets/Fungus/Lua/Resources/Lua/fungus.txt.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Resources/Lua/fungus.txt.meta
rename to Assets/Fungus/Lua/Resources/Lua/fungus.txt.meta
diff --git a/Assets/Fungus/FungusScript/Resources/Lua/inspect.txt b/Assets/Fungus/Lua/Resources/Lua/inspect.txt
similarity index 100%
rename from Assets/Fungus/FungusScript/Resources/Lua/inspect.txt
rename to Assets/Fungus/Lua/Resources/Lua/inspect.txt
diff --git a/Assets/Fungus/FungusScript/Resources/Lua/inspect.txt.meta b/Assets/Fungus/Lua/Resources/Lua/inspect.txt.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Resources/Lua/inspect.txt.meta
rename to Assets/Fungus/Lua/Resources/Lua/inspect.txt.meta
diff --git a/Assets/Fungus/FungusScript/Resources/Prefabs.meta b/Assets/Fungus/Lua/Resources/Prefabs.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Resources/Prefabs.meta
rename to Assets/Fungus/Lua/Resources/Prefabs.meta
diff --git a/Assets/Fungus/FungusScript/Resources/Prefabs/FungusScript.prefab b/Assets/Fungus/Lua/Resources/Prefabs/Lua.prefab
similarity index 92%
rename from Assets/Fungus/FungusScript/Resources/Prefabs/FungusScript.prefab
rename to Assets/Fungus/Lua/Resources/Prefabs/Lua.prefab
index c15862dd..a72102f3 100644
--- a/Assets/Fungus/FungusScript/Resources/Prefabs/FungusScript.prefab
+++ b/Assets/Fungus/Lua/Resources/Prefabs/Lua.prefab
@@ -10,7 +10,7 @@ GameObject:
- 4: {fileID: 495584}
- 114: {fileID: 11493126}
m_Layer: 0
- m_Name: FungusScript
+ m_Name: Lua
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -45,8 +45,6 @@ MonoBehaviour:
timeScale: -1
registerTypes:
- {fileID: 4900000, guid: 9c3ab7a98d51241bbb499643399fa761, type: 3}
- registerExtensionTypes:
- - {fileID: 4900000, guid: 2978c0ed6806b42629d2bf7d0d1f220c, type: 3}
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
diff --git a/Assets/Fungus/FungusScript/Resources/Prefabs/FungusScript.prefab.meta b/Assets/Fungus/Lua/Resources/Prefabs/Lua.prefab.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Resources/Prefabs/FungusScript.prefab.meta
rename to Assets/Fungus/Lua/Resources/Prefabs/Lua.prefab.meta
diff --git a/Assets/Fungus/FungusScript/Resources/Prefabs/LuaBindings.prefab b/Assets/Fungus/Lua/Resources/Prefabs/LuaBindings.prefab
similarity index 100%
rename from Assets/Fungus/FungusScript/Resources/Prefabs/LuaBindings.prefab
rename to Assets/Fungus/Lua/Resources/Prefabs/LuaBindings.prefab
diff --git a/Assets/Fungus/FungusScript/Resources/Prefabs/LuaBindings.prefab.meta b/Assets/Fungus/Lua/Resources/Prefabs/LuaBindings.prefab.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Resources/Prefabs/LuaBindings.prefab.meta
rename to Assets/Fungus/Lua/Resources/Prefabs/LuaBindings.prefab.meta
diff --git a/Assets/Fungus/FungusScript/Resources/Prefabs/RunLua.prefab b/Assets/Fungus/Lua/Resources/Prefabs/RunLua.prefab
similarity index 100%
rename from Assets/Fungus/FungusScript/Resources/Prefabs/RunLua.prefab
rename to Assets/Fungus/Lua/Resources/Prefabs/RunLua.prefab
diff --git a/Assets/Fungus/FungusScript/Resources/Prefabs/RunLua.prefab.meta b/Assets/Fungus/Lua/Resources/Prefabs/RunLua.prefab.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Resources/Prefabs/RunLua.prefab.meta
rename to Assets/Fungus/Lua/Resources/Prefabs/RunLua.prefab.meta
diff --git a/Assets/Fungus/FungusScript/Resources/Types.meta b/Assets/Fungus/Lua/Resources/Types.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Resources/Types.meta
rename to Assets/Fungus/Lua/Resources/Types.meta
diff --git a/Assets/Fungus/FungusScript/Resources/Types/ExtensionTypes.txt b/Assets/Fungus/Lua/Resources/Types/ExtensionTypes.txt
similarity index 100%
rename from Assets/Fungus/FungusScript/Resources/Types/ExtensionTypes.txt
rename to Assets/Fungus/Lua/Resources/Types/ExtensionTypes.txt
diff --git a/Assets/Fungus/FungusScript/Resources/Types/ExtensionTypes.txt.meta b/Assets/Fungus/Lua/Resources/Types/ExtensionTypes.txt.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Resources/Types/ExtensionTypes.txt.meta
rename to Assets/Fungus/Lua/Resources/Types/ExtensionTypes.txt.meta
diff --git a/Assets/Fungus/FungusScript/Resources/Types/RegisterTypes.txt b/Assets/Fungus/Lua/Resources/Types/RegisterTypes.txt
similarity index 99%
rename from Assets/Fungus/FungusScript/Resources/Types/RegisterTypes.txt
rename to Assets/Fungus/Lua/Resources/Types/RegisterTypes.txt
index 03133998..ff499eb7 100644
--- a/Assets/Fungus/FungusScript/Resources/Types/RegisterTypes.txt
+++ b/Assets/Fungus/Lua/Resources/Types/RegisterTypes.txt
@@ -18,7 +18,7 @@ Fungus.FacingDirection
Fungus.FloatVariable
Fungus.Flowchart
Fungus.FungusPrefs
-Fungus.FungusScript
+Fungus.Lua
Fungus.GameObjectVariable
Fungus.IntegerVariable
Fungus.Label
@@ -95,4 +95,4 @@ UnityEngine.VerticalWrapMode, UnityEngine, Version=0.0.0.0, Culture=neutral, Pub
# Extension types
-E:Fungus.FungusScriptExtensions
+E:Fungus.LuaExtensions
diff --git a/Assets/Fungus/FungusScript/Resources/Types/RegisterTypes.txt.meta b/Assets/Fungus/Lua/Resources/Types/RegisterTypes.txt.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Resources/Types/RegisterTypes.txt.meta
rename to Assets/Fungus/Lua/Resources/Types/RegisterTypes.txt.meta
diff --git a/Assets/Fungus/FungusScript/Scripts.meta b/Assets/Fungus/Lua/Scripts.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts.meta
rename to Assets/Fungus/Lua/Scripts.meta
diff --git a/Assets/Fungus/FungusScript/Scripts/Editor.meta b/Assets/Fungus/Lua/Scripts/Editor.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts/Editor.meta
rename to Assets/Fungus/Lua/Scripts/Editor.meta
diff --git a/Assets/Fungus/FungusScript/Scripts/Editor/DropDownControl.cs b/Assets/Fungus/Lua/Scripts/Editor/DropDownControl.cs
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts/Editor/DropDownControl.cs
rename to Assets/Fungus/Lua/Scripts/Editor/DropDownControl.cs
diff --git a/Assets/Fungus/FungusScript/Scripts/Editor/DropDownControl.cs.meta b/Assets/Fungus/Lua/Scripts/Editor/DropDownControl.cs.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts/Editor/DropDownControl.cs.meta
rename to Assets/Fungus/Lua/Scripts/Editor/DropDownControl.cs.meta
diff --git a/Assets/Fungus/FungusScript/Scripts/Editor/LuaBindingsEditor.cs b/Assets/Fungus/Lua/Scripts/Editor/LuaBindingsEditor.cs
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts/Editor/LuaBindingsEditor.cs
rename to Assets/Fungus/Lua/Scripts/Editor/LuaBindingsEditor.cs
diff --git a/Assets/Fungus/FungusScript/Scripts/Editor/LuaBindingsEditor.cs.meta b/Assets/Fungus/Lua/Scripts/Editor/LuaBindingsEditor.cs.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts/Editor/LuaBindingsEditor.cs.meta
rename to Assets/Fungus/Lua/Scripts/Editor/LuaBindingsEditor.cs.meta
diff --git a/Assets/Fungus/FungusScript/Scripts/Editor/FungusScriptEditor.cs b/Assets/Fungus/Lua/Scripts/Editor/LuaEditor.cs
similarity index 93%
rename from Assets/Fungus/FungusScript/Scripts/Editor/FungusScriptEditor.cs
rename to Assets/Fungus/Lua/Scripts/Editor/LuaEditor.cs
index f486c056..3b7d2e6f 100644
--- a/Assets/Fungus/FungusScript/Scripts/Editor/FungusScriptEditor.cs
+++ b/Assets/Fungus/Lua/Scripts/Editor/LuaEditor.cs
@@ -10,8 +10,8 @@ using System.IO;
namespace Fungus
{
- [CustomEditor (typeof(FungusScript))]
- public class FungusScriptEditor : Editor
+ [CustomEditor (typeof(Lua))]
+ public class LuaEditor : Editor
{
protected SerializedProperty registerTypesProp;
protected ReorderableList registerTypeList;
diff --git a/Assets/Fungus/FungusScript/Scripts/Editor/FungusScriptEditor.cs.meta b/Assets/Fungus/Lua/Scripts/Editor/LuaEditor.cs.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts/Editor/FungusScriptEditor.cs.meta
rename to Assets/Fungus/Lua/Scripts/Editor/LuaEditor.cs.meta
diff --git a/Assets/Fungus/FungusScript/Scripts/Editor/MenuItems.cs b/Assets/Fungus/Lua/Scripts/Editor/MenuItems.cs
similarity index 95%
rename from Assets/Fungus/FungusScript/Scripts/Editor/MenuItems.cs
rename to Assets/Fungus/Lua/Scripts/Editor/MenuItems.cs
index 5db25bac..5f7cbe84 100644
--- a/Assets/Fungus/FungusScript/Scripts/Editor/MenuItems.cs
+++ b/Assets/Fungus/Lua/Scripts/Editor/MenuItems.cs
@@ -8,10 +8,10 @@ namespace Fungus
public class MenuItems
{
- [MenuItem("Tools/Fungus/Create/Fungus Script", false, 2000)]
- static void CreateFungusScript()
+ [MenuItem("Tools/Fungus/Create/Lua", false, 2000)]
+ static void CreateLua()
{
- SpawnPrefab("Prefabs/FungusScript", false);
+ SpawnPrefab("Prefabs/Lua", false);
}
[MenuItem("Tools/Fungus/Create/Lua Bindings", false, 2001)]
diff --git a/Assets/Fungus/FungusScript/Scripts/Editor/MenuItems.cs.meta b/Assets/Fungus/Lua/Scripts/Editor/MenuItems.cs.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts/Editor/MenuItems.cs.meta
rename to Assets/Fungus/Lua/Scripts/Editor/MenuItems.cs.meta
diff --git a/Assets/Fungus/FungusScript/Scripts/Editor/RunLuaEditor.cs b/Assets/Fungus/Lua/Scripts/Editor/RunLuaEditor.cs
similarity index 97%
rename from Assets/Fungus/FungusScript/Scripts/Editor/RunLuaEditor.cs
rename to Assets/Fungus/Lua/Scripts/Editor/RunLuaEditor.cs
index 5df8317e..908629e9 100644
--- a/Assets/Fungus/FungusScript/Scripts/Editor/RunLuaEditor.cs
+++ b/Assets/Fungus/Lua/Scripts/Editor/RunLuaEditor.cs
@@ -24,7 +24,7 @@ namespace Fungus
private readonly GUIContent m_GUIRepeatExecuteFrameGuiContent = new GUIContent("Repeat execution", "Should the execution be repeated.");
#endregion
- protected SerializedProperty fungusScriptProp;
+ protected SerializedProperty luaEnvironmentProp;
protected SerializedProperty runAsCoroutineProp;
protected SerializedProperty luaFileProp;
protected SerializedProperty luaScriptProp;
@@ -42,7 +42,7 @@ namespace Fungus
public virtual void OnEnable()
{
- fungusScriptProp = serializedObject.FindProperty("fungusScript");
+ luaEnvironmentProp = serializedObject.FindProperty("luaEnvironment");
runAsCoroutineProp = serializedObject.FindProperty("runAsCoroutine");
luaFileProp = serializedObject.FindProperty("luaFile");
luaScriptProp = serializedObject.FindProperty("luaScript");
@@ -103,7 +103,7 @@ namespace Fungus
serializedObject.Update();
- EditorGUILayout.PropertyField(fungusScriptProp);
+ EditorGUILayout.PropertyField(luaEnvironmentProp);
EditorGUILayout.PropertyField(runAsCoroutineProp);
EditorGUILayout.PropertyField(useFungusModuleProp);
diff --git a/Assets/Fungus/FungusScript/Scripts/Editor/RunLuaEditor.cs.meta b/Assets/Fungus/Lua/Scripts/Editor/RunLuaEditor.cs.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts/Editor/RunLuaEditor.cs.meta
rename to Assets/Fungus/Lua/Scripts/Editor/RunLuaEditor.cs.meta
diff --git a/Assets/Fungus/FungusScript/Scripts/FungusPrefs.cs b/Assets/Fungus/Lua/Scripts/FungusPrefs.cs
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts/FungusPrefs.cs
rename to Assets/Fungus/Lua/Scripts/FungusPrefs.cs
diff --git a/Assets/Fungus/FungusScript/Scripts/FungusPrefs.cs.meta b/Assets/Fungus/Lua/Scripts/FungusPrefs.cs.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts/FungusPrefs.cs.meta
rename to Assets/Fungus/Lua/Scripts/FungusPrefs.cs.meta
diff --git a/Assets/Fungus/FungusScript/Scripts/FungusScript.cs b/Assets/Fungus/Lua/Scripts/Lua.cs
similarity index 94%
rename from Assets/Fungus/FungusScript/Scripts/FungusScript.cs
rename to Assets/Fungus/Lua/Scripts/Lua.cs
index 16d42331..97a7f565 100644
--- a/Assets/Fungus/FungusScript/Scripts/FungusScript.cs
+++ b/Assets/Fungus/Lua/Scripts/Lua.cs
@@ -13,17 +13,17 @@ using MoonSharp.RemoteDebugger;
namespace Fungus
{
- public class FungusScript : MonoBehaviour
+ public class Lua : MonoBehaviour
{
///
/// Custom file loader for MoonSharp that loads in all Lua scripts in the project.
/// Scripts must be placed in a Resources/Lua directory.
///
- protected class FungusScriptLoader : ScriptLoaderBase
+ protected class LuaScriptLoader : ScriptLoaderBase
{
// Give the script loader access to the list of accessible Lua Modules.
private IEnumerable luaScripts;
- public FungusScriptLoader(IEnumerable luaScripts)
+ public LuaScriptLoader(IEnumerable luaScripts)
{
this.luaScripts = luaScripts;
}
@@ -63,6 +63,26 @@ namespace Fungus
}
}
+ ///
+ /// Returns the first Lua component found in the scene, or creates one if none exists.
+ /// This is a slow operation, call it once at startup and cache the returned value.
+ ///
+ public static Lua GetLua()
+ {
+ Lua lua = GameObject.FindObjectOfType();
+ if (lua == null)
+ {
+ GameObject prefab = Resources.Load("Prefabs/Lua");
+ if (prefab != null)
+ {
+ GameObject go = Instantiate(prefab) as GameObject;
+ go.name = "Lua";
+ lua = go.GetComponent();
+ }
+ }
+ return lua;
+ }
+
protected Script interpreter;
///
@@ -90,7 +110,7 @@ namespace Fungus
///
/// Time scale factor to apply when running Lua scripts.
- /// This allows pausing of a FungusScript by setting timescale to 0.
+ /// This allows pausing of time based operations by setting timescale to 0.
/// Use the GetTime() and GetDeltaTime() functions to get scaled time values.
/// If negative, then GetTime() and GetDeltaTime() return the same values as the standard Time class.
///
@@ -160,7 +180,7 @@ namespace Fungus
protected virtual void InitLuaScriptFiles()
{
object[] result = Resources.LoadAll("Lua", typeof(TextAsset));
- interpreter.Options.ScriptLoader = new FungusScriptLoader(result.OfType());
+ interpreter.Options.ScriptLoader = new LuaScriptLoader(result.OfType());
}
///
@@ -249,8 +269,8 @@ namespace Fungus
UserData.RegisterType(typeof(PODTypeFactory));
unityTable["factory"] = UserData.CreateStatic(typeof(PODTypeFactory));
- // This FungusScript object
- unityTable["fungusscript"] = this;
+ // This Lua object
+ unityTable["lua"] = this;
// Provide access to the Unity Test Tools (if available).
Type testType = Type.GetType("IntegrationTest");
@@ -518,7 +538,7 @@ namespace Fungus
///
/// Starts a standard Unity coroutine.
- /// The coroutine is managed by the FungusScript monobehavior, so you can call StopAllCoroutines to
+ /// The coroutine is managed by the Lua monobehavior, so you can call StopAllCoroutines to
/// stop all active coroutines later.
///
protected virtual IEnumerator RunUnityCoroutineImpl(IEnumerator coroutine)
diff --git a/Assets/Fungus/FungusScript/Scripts/FungusScript.cs.meta b/Assets/Fungus/Lua/Scripts/Lua.cs.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts/FungusScript.cs.meta
rename to Assets/Fungus/Lua/Scripts/Lua.cs.meta
diff --git a/Assets/Fungus/FungusScript/Scripts/LuaBindings.cs b/Assets/Fungus/Lua/Scripts/LuaBindings.cs
similarity index 97%
rename from Assets/Fungus/FungusScript/Scripts/LuaBindings.cs
rename to Assets/Fungus/Lua/Scripts/LuaBindings.cs
index 56315f52..7c381795 100644
--- a/Assets/Fungus/FungusScript/Scripts/LuaBindings.cs
+++ b/Assets/Fungus/Lua/Scripts/LuaBindings.cs
@@ -11,7 +11,7 @@ namespace Fungus
///
/// Base class for a component which registers Lua Bindings.
- /// When FungusScript initialises, it finds all components in the scene that inherit
+ /// When the Lua component initialises, it finds all components in the scene that inherit
/// from LuaBindingsBase and calls them to add their bindings.
///
public abstract class LuaBindingsBase : MonoBehaviour
@@ -100,7 +100,7 @@ namespace Fungus
// Register types of bound object with MoonSharp
foreach (string typeName in boundTypes)
{
- FungusScript.RegisterType(typeName);
+ Lua.RegisterType(typeName);
}
for (int i = 0; i < boundObjects.Count; ++i)
diff --git a/Assets/Fungus/FungusScript/Scripts/LuaBindings.cs.meta b/Assets/Fungus/Lua/Scripts/LuaBindings.cs.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts/LuaBindings.cs.meta
rename to Assets/Fungus/Lua/Scripts/LuaBindings.cs.meta
diff --git a/Assets/Fungus/FungusScript/Scripts/PODTypeFactory.cs b/Assets/Fungus/Lua/Scripts/PODTypeFactory.cs
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts/PODTypeFactory.cs
rename to Assets/Fungus/Lua/Scripts/PODTypeFactory.cs
diff --git a/Assets/Fungus/FungusScript/Scripts/PODTypeFactory.cs.meta b/Assets/Fungus/Lua/Scripts/PODTypeFactory.cs.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts/PODTypeFactory.cs.meta
rename to Assets/Fungus/Lua/Scripts/PODTypeFactory.cs.meta
diff --git a/Assets/Fungus/FungusScript/Scripts/RunLua.cs b/Assets/Fungus/Lua/Scripts/RunLua.cs
similarity index 94%
rename from Assets/Fungus/FungusScript/Scripts/RunLua.cs
rename to Assets/Fungus/Lua/Scripts/RunLua.cs
index efb09d1c..99eacb32 100644
--- a/Assets/Fungus/FungusScript/Scripts/RunLua.cs
+++ b/Assets/Fungus/Lua/Scripts/RunLua.cs
@@ -59,8 +59,8 @@ namespace Fungus
///
/// The Lua script environment to use when executing.
///
- [Tooltip("The Lua script environment to use when executing.")]
- public FungusScript fungusScript;
+ [Tooltip("The Lua environment to use when executing.")]
+ public Lua luaEnvironment;
///
/// Lua script file to execute.
@@ -103,16 +103,18 @@ namespace Fungus
public void Start()
{
- // If no FungusScript has been explicitly set then try to get one in the scene
- if (fungusScript == null)
- {
- fungusScript = GetComponentInParent();
- }
- if (fungusScript == null)
- {
- fungusScript = GameObject.FindObjectOfType();
- }
-
+ if (luaEnvironment == null)
+ {
+ // Create a Lua environment if none exists yet
+ luaEnvironment = Lua.GetLua();
+ }
+
+ if (luaEnvironment == null)
+ {
+ Debug.LogError("No Lua environment found");
+ return;
+ }
+
// Cache a descriptive name to use in Lua error messages
friendlyName = GetPath(transform) + ".RunLua";
@@ -289,9 +291,9 @@ namespace Fungus
///
public virtual void Execute()
{
- if (fungusScript == null)
+ if (luaEnvironment == null)
{
- Debug.LogWarning("No FungusScript selected");
+ Debug.LogWarning("No Lua component selected");
}
else
{
@@ -310,7 +312,7 @@ namespace Fungus
s += luaScript;
}
- fungusScript.DoLuaString(s, friendlyName, runAsCoroutine);
+ luaEnvironment.DoLuaString(s, friendlyName, runAsCoroutine);
}
}
diff --git a/Assets/Fungus/FungusScript/Scripts/RunLua.cs.meta b/Assets/Fungus/Lua/Scripts/RunLua.cs.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Scripts/RunLua.cs.meta
rename to Assets/Fungus/Lua/Scripts/RunLua.cs.meta
diff --git a/Assets/Fungus/FungusScript/Thirdparty.meta b/Assets/Fungus/Lua/Thirdparty.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty.meta
rename to Assets/Fungus/Lua/Thirdparty.meta
diff --git a/Assets/Fungus/FungusScript/Thirdparty/FungusExtensions.meta b/Assets/Fungus/Lua/Thirdparty/FungusExtensions.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/FungusExtensions.meta
rename to Assets/Fungus/Lua/Thirdparty/FungusExtensions.meta
diff --git a/Assets/Fungus/FungusScript/Thirdparty/FungusExtensions/ExecuteLua.cs b/Assets/Fungus/Lua/Thirdparty/FungusExtensions/ExecuteLua.cs
similarity index 89%
rename from Assets/Fungus/FungusScript/Thirdparty/FungusExtensions/ExecuteLua.cs
rename to Assets/Fungus/Lua/Thirdparty/FungusExtensions/ExecuteLua.cs
index b8839357..bc32026f 100644
--- a/Assets/Fungus/FungusScript/Thirdparty/FungusExtensions/ExecuteLua.cs
+++ b/Assets/Fungus/Lua/Thirdparty/FungusExtensions/ExecuteLua.cs
@@ -8,11 +8,11 @@ namespace Fungus
[CommandInfo("Scripting",
"Execute Lua",
- "Executes a Lua code chunk using a FungusScript object.")]
+ "Executes a Lua code chunk using a Lua component.")]
public class ExecuteLua : Command
{
- [Tooltip("FungusScript to use to execute this Lua script")]
- public FungusScript fungusScript;
+ [Tooltip("Lua environment to use to execute this Lua script")]
+ public Lua luaEnvironment;
[TextArea(10,100)]
[Tooltip("Lua script to execute. Use {$VarName} to insert a Flowchart variable in the Lua script.")]
@@ -40,13 +40,25 @@ namespace Fungus
{
// Cache a descriptive name to use in Lua error messages
friendlyName = gameObject.name + "." + parentBlock.blockName + "." + "ExecuteLua #" + commandIndex.ToString();
- }
+
+ if (luaEnvironment == null)
+ {
+ luaEnvironment = Lua.GetLua();
+ }
+ }
public override void OnEnter()
{
- if (fungusScript == null)
- {
- Debug.LogWarning("No FungusScript object selected");
+ // This command could be executed from the Start of another component, so we
+ // need to check the Lua environment here and in Start.
+ if (luaEnvironment == null)
+ {
+ luaEnvironment = Lua.GetLua();
+ }
+
+ if (luaEnvironment == null)
+ {
+ Debug.LogError("No Lua environment found");
Continue();
return;
}
@@ -59,7 +71,7 @@ namespace Fungus
string subbed = s + GetFlowchart().SubstituteVariables(luaScript);
- fungusScript.DoLuaString(subbed, friendlyName, runAsCoroutine, (returnValue) => {
+ luaEnvironment.DoLuaString(subbed, friendlyName, runAsCoroutine, (returnValue) => {
StoreReturnVariable(returnValue);
if (waitUntilFinished)
{
@@ -138,11 +150,6 @@ namespace Fungus
public override string GetSummary()
{
- if (fungusScript == null)
- {
- return "Error: No FungusScript object selected";
- }
-
return luaScript;
}
diff --git a/Assets/Fungus/FungusScript/Thirdparty/FungusExtensions/ExecuteLua.cs.meta b/Assets/Fungus/Lua/Thirdparty/FungusExtensions/ExecuteLua.cs.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/FungusExtensions/ExecuteLua.cs.meta
rename to Assets/Fungus/Lua/Thirdparty/FungusExtensions/ExecuteLua.cs.meta
diff --git a/Assets/Fungus/FungusScript/Thirdparty/FungusExtensions/FungusScriptExtensions.cs b/Assets/Fungus/Lua/Thirdparty/FungusExtensions/LuaExtensions.cs
similarity index 88%
rename from Assets/Fungus/FungusScript/Thirdparty/FungusExtensions/FungusScriptExtensions.cs
rename to Assets/Fungus/Lua/Thirdparty/FungusExtensions/LuaExtensions.cs
index a1a7b351..7a357e6a 100644
--- a/Assets/Fungus/FungusScript/Thirdparty/FungusExtensions/FungusScriptExtensions.cs
+++ b/Assets/Fungus/Lua/Thirdparty/FungusExtensions/LuaExtensions.cs
@@ -7,13 +7,13 @@ using MoonSharp.Interpreter;
namespace Fungus
{
- public static class FungusScriptExtensions
+ public static class LuaExtensions
{
///
/// Extension for MenuDialog that allows AddOption to call a Lua function when an option is selected.
///
- public static bool AddOption(this MenuDialog menuDialog, string text, bool interactable, FungusScript fungusScript, Closure callBack)
+ public static bool AddOption(this MenuDialog menuDialog, string text, bool interactable, Lua lua, Closure callBack)
{
bool addedOption = false;
foreach (Button button in menuDialog.cachedButtons)
@@ -41,7 +41,7 @@ namespace Fungus
if (callBack != null)
{
- fungusScript.RunLuaCoroutine(callBack, text);
+ lua.RunLuaCoroutine(callBack, text);
}
});
@@ -56,7 +56,7 @@ namespace Fungus
///
/// Extension for MenuDialog that allows ShowTimer to call a Lua function when the timer expires.
///
- public static IEnumerator ShowTimer(this MenuDialog menuDialog, float duration, FungusScript fungusScript, Closure callBack)
+ public static IEnumerator ShowTimer(this MenuDialog menuDialog, float duration, Lua lua, Closure callBack)
{
if (menuDialog.cachedSlider == null ||
duration <= 0f)
@@ -89,7 +89,7 @@ namespace Fungus
if (callBack != null)
{
- fungusScript.RunLuaCoroutine(callBack, "menutimer");
+ lua.RunLuaCoroutine(callBack, "menutimer");
}
}
}
diff --git a/Assets/Fungus/FungusScript/Thirdparty/FungusExtensions/FungusScriptExtensions.cs.meta b/Assets/Fungus/Lua/Thirdparty/FungusExtensions/LuaExtensions.cs.meta
similarity index 76%
rename from Assets/Fungus/FungusScript/Thirdparty/FungusExtensions/FungusScriptExtensions.cs.meta
rename to Assets/Fungus/Lua/Thirdparty/FungusExtensions/LuaExtensions.cs.meta
index 5c88060a..4b49cb96 100644
--- a/Assets/Fungus/FungusScript/Thirdparty/FungusExtensions/FungusScriptExtensions.cs.meta
+++ b/Assets/Fungus/Lua/Thirdparty/FungusExtensions/LuaExtensions.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
-guid: d3cdbb71635f4406baec64f33d24514f
-timeCreated: 1456230091
+guid: 998f811805a17465ba6720248632ec01
+timeCreated: 1459502744
licenseType: Free
MonoImporter:
serializedVersion: 2
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp.meta b/Assets/Fungus/Lua/Thirdparty/MoonSharp.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp.meta
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp.meta
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/LICENSE b/Assets/Fungus/Lua/Thirdparty/MoonSharp/LICENSE
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/LICENSE
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/LICENSE
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/LICENSE.meta b/Assets/Fungus/Lua/Thirdparty/MoonSharp/LICENSE.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/LICENSE.meta
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/LICENSE.meta
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Hardwire.dll b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.dll
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Hardwire.dll
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.dll
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Hardwire.dll.meta b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.dll.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Hardwire.dll.meta
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.dll.meta
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Hardwire.pdb b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.pdb
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Hardwire.pdb
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.pdb
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Hardwire.pdb.meta b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.pdb.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Hardwire.pdb.meta
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.pdb.meta
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.dll b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.dll
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.dll
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.dll
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.dll.meta b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.dll.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.dll.meta
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.dll.meta
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.pdb b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.pdb
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.pdb
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.pdb
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.pdb.meta b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.pdb.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.pdb.meta
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.pdb.meta
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.xml b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.xml
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.xml
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.xml
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.xml.meta b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.xml.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.xml.meta
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.xml.meta
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.dll b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.dll
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.dll
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.dll
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.dll.meta b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.dll.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.dll.meta
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.dll.meta
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.pdb b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.pdb
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.pdb
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.pdb
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.pdb.meta b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.pdb.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.pdb.meta
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.pdb.meta
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.pdb b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.pdb
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.pdb
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.pdb
diff --git a/Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.pdb.meta b/Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.pdb.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.pdb.meta
rename to Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.pdb.meta
diff --git a/Assets/Fungus/FungusScript/Thirdparty/TaskManager.meta b/Assets/Fungus/Lua/Thirdparty/TaskManager.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/TaskManager.meta
rename to Assets/Fungus/Lua/Thirdparty/TaskManager.meta
diff --git a/Assets/Fungus/FungusScript/Thirdparty/TaskManager/TaskManager.cs b/Assets/Fungus/Lua/Thirdparty/TaskManager/TaskManager.cs
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/TaskManager/TaskManager.cs
rename to Assets/Fungus/Lua/Thirdparty/TaskManager/TaskManager.cs
diff --git a/Assets/Fungus/FungusScript/Thirdparty/TaskManager/TaskManager.cs.meta b/Assets/Fungus/Lua/Thirdparty/TaskManager/TaskManager.cs.meta
similarity index 100%
rename from Assets/Fungus/FungusScript/Thirdparty/TaskManager/TaskManager.cs.meta
rename to Assets/Fungus/Lua/Thirdparty/TaskManager/TaskManager.cs.meta
diff --git a/Assets/FungusExamples/FungusScript.meta b/Assets/FungusExamples/Lua.meta
similarity index 100%
rename from Assets/FungusExamples/FungusScript.meta
rename to Assets/FungusExamples/Lua.meta
diff --git a/Assets/FungusExamples/FungusScript/Narrative.unity b/Assets/FungusExamples/Lua/Narrative.unity
similarity index 100%
rename from Assets/FungusExamples/FungusScript/Narrative.unity
rename to Assets/FungusExamples/Lua/Narrative.unity
diff --git a/Assets/FungusExamples/FungusScript/Narrative.unity.meta b/Assets/FungusExamples/Lua/Narrative.unity.meta
similarity index 100%
rename from Assets/FungusExamples/FungusScript/Narrative.unity.meta
rename to Assets/FungusExamples/Lua/Narrative.unity.meta
diff --git a/Assets/FungusExamples/FungusScript/Trigger.unity b/Assets/FungusExamples/Lua/Trigger.unity
similarity index 99%
rename from Assets/FungusExamples/FungusScript/Trigger.unity
rename to Assets/FungusExamples/Lua/Trigger.unity
index 2512a941..009bdde6 100644
--- a/Assets/FungusExamples/FungusScript/Trigger.unity
+++ b/Assets/FungusExamples/Lua/Trigger.unity
@@ -313,6 +313,7 @@ MonoBehaviour:
- key: saydialog
obj: {fileID: 974098819}
component: {fileID: 974098824}
+ boundTypes: []
--- !u!4 &775333279
Transform:
m_ObjectHideFlags: 0
@@ -368,11 +369,12 @@ MonoBehaviour:
y: -340
width: 1114
height: 859
- selectedBlock: {fileID: 913136541}
- selectedCommands:
- - {fileID: 913136542}
+ selectedBlock: {fileID: 0}
+ selectedCommands: []
variables: []
- description:
+ description: 'This example shows how to execute a Block in a Flowchart via a
+
+ Lua script executed by a trigger.'
stepPause: 0
colorCommands: 1
hideComponents: 1
@@ -433,7 +435,7 @@ MonoBehaviour:
- {fileID: 913136542}
--- !u!114 &913136542
MonoBehaviour:
- m_ObjectHideFlags: 0
+ m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 913136538}
@@ -949,12 +951,6 @@ CanvasRenderer:
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1073217510}
---- !u!114 &1124933057 stripped
-MonoBehaviour:
- m_PrefabParentObject: {fileID: 11493126, guid: 49031c561e16d4fcf91c12153f8e0b25,
- type: 2}
- m_PrefabInternal: {fileID: 1575311449}
- m_Script: {fileID: 11500000, guid: ba19c26c1ba7243d2b57ebc4329cc7c6, type: 3}
--- !u!1 &1248777639
GameObject:
m_ObjectHideFlags: 0
@@ -1224,7 +1220,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 8192
- fungusScript: {fileID: 1124933057}
+ luaEnvironment: {fileID: 0}
luaFile: {fileID: 0}
luaScript: 'fungus.runblock(flowchart, "Start")
diff --git a/Assets/FungusExamples/FungusScript/Trigger.unity.meta b/Assets/FungusExamples/Lua/Trigger.unity.meta
similarity index 100%
rename from Assets/FungusExamples/FungusScript/Trigger.unity.meta
rename to Assets/FungusExamples/Lua/Trigger.unity.meta
diff --git a/Assets/Tests/FungusScript.meta b/Assets/Tests/Lua.meta
similarity index 100%
rename from Assets/Tests/FungusScript.meta
rename to Assets/Tests/Lua.meta
diff --git a/Assets/Tests/FungusScript/DummyCollection.cs b/Assets/Tests/Lua/DummyCollection.cs
similarity index 100%
rename from Assets/Tests/FungusScript/DummyCollection.cs
rename to Assets/Tests/Lua/DummyCollection.cs
diff --git a/Assets/Tests/FungusScript/DummyCollection.cs.meta b/Assets/Tests/Lua/DummyCollection.cs.meta
similarity index 100%
rename from Assets/Tests/FungusScript/DummyCollection.cs.meta
rename to Assets/Tests/Lua/DummyCollection.cs.meta
diff --git a/Assets/Tests/FungusScript/FungusTests.unity b/Assets/Tests/Lua/FungusTests.unity
similarity index 98%
rename from Assets/Tests/FungusScript/FungusTests.unity
rename to Assets/Tests/Lua/FungusTests.unity
index 3599dd8b..c1c1fbb8 100644
--- a/Assets/Tests/FungusScript/FungusTests.unity
+++ b/Assets/Tests/Lua/FungusTests.unity
@@ -142,6 +142,7 @@ MonoBehaviour:
- key: voiceover
obj: {fileID: 8300000, guid: d2ab1fbe555d44e9e870311657856bdc, type: 3}
component: {fileID: 0}
+ boundTypes: []
--- !u!1 &13683311
GameObject:
m_ObjectHideFlags: 0
@@ -714,6 +715,7 @@ MonoBehaviour:
- key: menudialog
obj: {fileID: 560555132}
component: {fileID: 560555134}
+ boundTypes: []
--- !u!4 &36455799 stripped
Transform:
m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2}
@@ -764,7 +766,7 @@ MonoBehaviour:
itemId: 1
errorMessage:
indentLevel: 0
- fungusScript: {fileID: 2134815028}
+ luaEnvironment: {fileID: 0}
luaScript: '-- Test executing Lua script from a Fungus command
@@ -1101,7 +1103,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 0}
+ luaEnvironment: {fileID: 0}
luaFile: {fileID: 0}
luaScript: '-- Check the starting value of StringVar
@@ -1356,6 +1358,7 @@ MonoBehaviour:
- key: optionbutton0
obj: {fileID: 876352038}
component: {fileID: 876352041}
+ boundTypes: []
--- !u!1 &190681717
GameObject:
m_ObjectHideFlags: 0
@@ -1881,12 +1884,6 @@ Transform:
Transform:
m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2}
m_PrefabInternal: {fileID: 110499668}
---- !u!114 &294355417 stripped
-MonoBehaviour:
- m_PrefabParentObject: {fileID: 11493126, guid: 49031c561e16d4fcf91c12153f8e0b25,
- type: 2}
- m_PrefabInternal: {fileID: 110499668}
- m_Script: {fileID: 11500000, guid: ba19c26c1ba7243d2b57ebc4329cc7c6, type: 3}
--- !u!4 &316730978 stripped
Transform:
m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2}
@@ -2172,10 +2169,10 @@ RectTransform:
- {fileID: 913989833}
m_Father: {fileID: 465829170}
m_RootOrder: 3
- m_AnchorMin: {x: 0, y: 0}
- m_AnchorMax: {x: 0, y: 0}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 0, y: 0}
+ m_AnchorMin: {x: 0, y: 1}
+ m_AnchorMax: {x: 0, y: 1}
+ m_AnchoredPosition: {x: 650, y: -365}
+ m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &398057889
MonoBehaviour:
@@ -2377,10 +2374,10 @@ RectTransform:
- {fileID: 1088283066}
m_Father: {fileID: 465829170}
m_RootOrder: 1
- m_AnchorMin: {x: 0, y: 0}
- m_AnchorMax: {x: 0, y: 0}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 0, y: 0}
+ m_AnchorMin: {x: 0, y: 1}
+ m_AnchorMax: {x: 0, y: 1}
+ m_AnchoredPosition: {x: 650, y: -155}
+ m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &405820710
MonoBehaviour:
@@ -2526,7 +2523,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 0}
+ luaEnvironment: {fileID: 0}
luaFile: {fileID: 0}
luaScript: '-- The "Do Test" block in the flowchart sets a bunch of flowchart variables
@@ -2638,7 +2635,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -0.000018477, y: 191}
- m_SizeDelta: {x: 1300, y: 0}
+ m_SizeDelta: {x: 1300, y: 680}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &465829171
MonoBehaviour:
@@ -2720,6 +2717,7 @@ MonoBehaviour:
- key: flowchart
obj: {fileID: 1983492490}
component: {fileID: 1983492495}
+ boundTypes: []
--- !u!1 &507572619
GameObject:
m_ObjectHideFlags: 0
@@ -2753,10 +2751,10 @@ RectTransform:
- {fileID: 1446085149}
m_Father: {fileID: 465829170}
m_RootOrder: 6
- m_AnchorMin: {x: 0, y: 0}
- m_AnchorMax: {x: 0, y: 0}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 0, y: 0}
+ m_AnchorMin: {x: 0, y: 1}
+ m_AnchorMax: {x: 0, y: 1}
+ m_AnchoredPosition: {x: 650, y: -655}
+ m_SizeDelta: {x: 1300, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &507572621
MonoBehaviour:
@@ -2908,7 +2906,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 0}
+ luaEnvironment: {fileID: 0}
luaFile: {fileID: 0}
luaScript: "fungus.menuoptions.menudialog = menudialog\n\nfunction option1()\n fungus.fail()\nend\n\nfungus.menu(\"Option
1\", option1)\n\nfungus.assert(optionbutton0.activeSelf)\nfungus.clearmenu()\nfungus.assert(not
@@ -2962,7 +2960,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 0}
+ luaEnvironment: {fileID: 0}
luaFile: {fileID: 0}
luaScript: "-- Test the Menu Timer functionality\n\nfungus.menuoptions.menudialog
= menudialog\n\n-- Called if user clicks on menu option\nfunction option1()\n
@@ -3176,10 +3174,10 @@ RectTransform:
- {fileID: 913529610}
m_Father: {fileID: 465829170}
m_RootOrder: 2
- m_AnchorMin: {x: 0, y: 0}
- m_AnchorMax: {x: 0, y: 0}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 0, y: 0}
+ m_AnchorMin: {x: 0, y: 1}
+ m_AnchorMax: {x: 0, y: 1}
+ m_AnchoredPosition: {x: 650, y: -260}
+ m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &625261051
MonoBehaviour:
@@ -3466,12 +3464,6 @@ Transform:
Transform:
m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2}
m_PrefabInternal: {fileID: 726346786}
---- !u!114 &715246548 stripped
-MonoBehaviour:
- m_PrefabParentObject: {fileID: 11493126, guid: 49031c561e16d4fcf91c12153f8e0b25,
- type: 2}
- m_PrefabInternal: {fileID: 726346786}
- m_Script: {fileID: 11500000, guid: ba19c26c1ba7243d2b57ebc4329cc7c6, type: 3}
--- !u!1 &715595886
GameObject:
m_ObjectHideFlags: 0
@@ -3505,10 +3497,10 @@ RectTransform:
- {fileID: 863130403}
m_Father: {fileID: 465829170}
m_RootOrder: 4
- m_AnchorMin: {x: 0, y: 0}
- m_AnchorMax: {x: 0, y: 0}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 0, y: 0}
+ m_AnchorMin: {x: 0, y: 1}
+ m_AnchorMax: {x: 0, y: 1}
+ m_AnchoredPosition: {x: 650, y: -470}
+ m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &715595888
MonoBehaviour:
@@ -3655,6 +3647,7 @@ MonoBehaviour:
- key: transform
obj: {fileID: 328064332}
component: {fileID: 328064333}
+ boundTypes: []
--- !u!1001 &726346786
Prefab:
m_ObjectHideFlags: 0
@@ -4288,7 +4281,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 0}
+ luaEnvironment: {fileID: 0}
luaFile: {fileID: 0}
luaScript: '-- Test getting and setting Fungus variables
@@ -4425,10 +4418,10 @@ RectTransform:
- {fileID: 884473401}
m_Father: {fileID: 465829170}
m_RootOrder: 0
- m_AnchorMin: {x: 0, y: 0}
- m_AnchorMax: {x: 0, y: 0}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 0, y: 0}
+ m_AnchorMin: {x: 0, y: 1}
+ m_AnchorMax: {x: 0, y: 1}
+ m_AnchoredPosition: {x: 650, y: -50}
+ m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &876352040
MonoBehaviour:
@@ -4846,6 +4839,7 @@ MonoBehaviour:
- key:
obj: {fileID: 0}
component: {fileID: 0}
+ boundTypes: []
--- !u!1 &928936324
GameObject:
m_ObjectHideFlags: 0
@@ -5100,7 +5094,7 @@ MonoBehaviour:
itemId: 1
errorMessage:
indentLevel: 0
- fungusScript: {fileID: 715246548}
+ luaEnvironment: {fileID: 0}
luaScript: return true
useFungusModule: 1
runAsCoroutine: 0
@@ -5166,7 +5160,8 @@ MonoBehaviour:
width: 1114
height: 859
selectedBlock: {fileID: 942227027}
- selectedCommands: []
+ selectedCommands:
+ - {fileID: 942227025}
variables:
- {fileID: 942227029}
- {fileID: 942227035}
@@ -5216,7 +5211,7 @@ MonoBehaviour:
itemId: 4
errorMessage:
indentLevel: 0
- fungusScript: {fileID: 715246548}
+ luaEnvironment: {fileID: 0}
luaScript: return 1.0
useFungusModule: 1
runAsCoroutine: 0
@@ -5236,7 +5231,7 @@ MonoBehaviour:
itemId: 3
errorMessage:
indentLevel: 0
- fungusScript: {fileID: 715246548}
+ luaEnvironment: {fileID: 0}
luaScript: return 2
useFungusModule: 1
runAsCoroutine: 0
@@ -5256,7 +5251,7 @@ MonoBehaviour:
itemId: 2
errorMessage:
indentLevel: 0
- fungusScript: {fileID: 715246548}
+ luaEnvironment: {fileID: 0}
luaScript: return "a string"
useFungusModule: 1
runAsCoroutine: 0
@@ -5332,7 +5327,7 @@ MonoBehaviour:
itemId: 6
errorMessage:
indentLevel: 0
- fungusScript: {fileID: 715246548}
+ luaEnvironment: {fileID: 0}
luaScript: 'local c = unity.factory.color(1, 0.5, 1, 1)
@@ -5355,7 +5350,7 @@ MonoBehaviour:
itemId: 7
errorMessage:
indentLevel: 0
- fungusScript: {fileID: 715246548}
+ luaEnvironment: {fileID: 0}
luaScript: return testgameobject
useFungusModule: 1
runAsCoroutine: 0
@@ -5403,7 +5398,7 @@ MonoBehaviour:
itemId: 9
errorMessage:
indentLevel: 0
- fungusScript: {fileID: 715246548}
+ luaEnvironment: {fileID: 0}
luaScript: return testmaterial
useFungusModule: 1
runAsCoroutine: 0
@@ -5437,7 +5432,7 @@ MonoBehaviour:
itemId: 10
errorMessage:
indentLevel: 0
- fungusScript: {fileID: 715246548}
+ luaEnvironment: {fileID: 0}
luaScript: return testgameobject
useFungusModule: 1
runAsCoroutine: 0
@@ -5471,7 +5466,7 @@ MonoBehaviour:
itemId: 11
errorMessage:
indentLevel: 0
- fungusScript: {fileID: 715246548}
+ luaEnvironment: {fileID: 0}
luaScript: return mushroom
useFungusModule: 1
runAsCoroutine: 0
@@ -5505,7 +5500,7 @@ MonoBehaviour:
itemId: 12
errorMessage:
indentLevel: 0
- fungusScript: {fileID: 715246548}
+ luaEnvironment: {fileID: 0}
luaScript: 'local v = unity.factory.vector2(1,1)
@@ -5542,7 +5537,7 @@ MonoBehaviour:
itemId: 13
errorMessage:
indentLevel: 0
- fungusScript: {fileID: 715246548}
+ luaEnvironment: {fileID: 0}
luaScript: return mousepointer
useFungusModule: 1
runAsCoroutine: 0
@@ -5576,7 +5571,7 @@ MonoBehaviour:
itemId: 14
errorMessage:
indentLevel: 0
- fungusScript: {fileID: 715246548}
+ luaEnvironment: {fileID: 0}
luaScript: 'local v = unity.factory.vector3(1,1,1)
return v'
@@ -6938,7 +6933,7 @@ RectTransform:
m_Father: {fileID: 1446085149}
m_RootOrder: 0
m_AnchorMin: {x: 0, y: 0}
- m_AnchorMax: {x: 0, y: 0}
+ m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 10, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
@@ -7570,7 +7565,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 294355417}
+ luaEnvironment: {fileID: 0}
luaFile: {fileID: 0}
luaScript: "-- Test the Menu Timer functionality\n\nfungus.menuoptions.menudialog
= menudialog\n\n-- Called if user clicks on menu option\nfunction option1()\n
@@ -8133,6 +8128,7 @@ MonoBehaviour:
- key: flowchart
obj: {fileID: 807616582}
component: {fileID: 807616590}
+ boundTypes: []
--- !u!1 &1738857300
GameObject:
m_ObjectHideFlags: 0
@@ -8432,10 +8428,10 @@ RectTransform:
- {fileID: 761668839}
m_Father: {fileID: 465829170}
m_RootOrder: 5
- m_AnchorMin: {x: 0, y: 0}
- m_AnchorMax: {x: 0, y: 0}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 0, y: 0}
+ m_AnchorMin: {x: 0, y: 1}
+ m_AnchorMax: {x: 0, y: 1}
+ m_AnchoredPosition: {x: 650, y: -575}
+ m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1762200959
MonoBehaviour:
@@ -8561,7 +8557,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3}
m_Name:
m_EditorClassIdentifier:
- selectedFlowchart: {fileID: 942227028}
+ selectedFlowchart: {fileID: 56584893}
--- !u!4 &1791050794
Transform:
m_ObjectHideFlags: 1
@@ -8621,7 +8617,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 0}
+ luaEnvironment: {fileID: 0}
luaFile: {fileID: 0}
luaScript: '-- Test Say Dialog integration
@@ -9131,7 +9127,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
- m_IsActive: 1
+ m_IsActive: 0
--- !u!114 &1993284458
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -9306,7 +9302,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 0}
+ luaEnvironment: {fileID: 0}
luaFile: {fileID: 0}
luaScript: '-- Use a Fungus flowchart to show a character portrait
@@ -9634,7 +9630,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 0}
+ luaEnvironment: {fileID: 0}
luaFile: {fileID: 0}
luaScript:
runAsCoroutine: 1
@@ -9738,6 +9734,49 @@ MonoBehaviour:
- key: mousepointer
obj: {fileID: 2800000, guid: efe8aa62cc87f4b70b9272e4e8e06668, type: 3}
component: {fileID: 0}
+ boundTypes:
+ - UnityEngine.GameObject, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.PrimitiveType, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.Component, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - System.Type, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ - System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ - System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ - UnityEngine.SendMessageOptions, UnityEngine, Version=0.0.0.0, Culture=neutral,
+ PublicKeyToken=null
+ - UnityEngine.SceneManagement.Scene, UnityEngine, Version=0.0.0.0, Culture=neutral,
+ PublicKeyToken=null
+ - UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - System.Single, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ - Fungus.Flowchart, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - Fungus.Block, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.Vector2, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - System.Action, System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ - Fungus.Variable, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - Fungus.Label, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - Fungus.Command, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - Fungus.CommandInfoAttribute, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
+ PublicKeyToken=null
+ - UnityEngine.Rect, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.Material, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.Shader, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.Color, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.Texture, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.Vector4, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.Matrix4x4, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.ComputeBuffer, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.MaterialGlobalIlluminationFlags, UnityEngine, Version=0.0.0.0, Culture=neutral,
+ PublicKeyToken=null
+ - UnityEngine.Sprite, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.Texture2D, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - System.UInt32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ - UnityEngine.SpriteMeshType, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.Bounds, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.SpritePackingMode, UnityEngine, Version=0.0.0.0, Culture=neutral,
+ PublicKeyToken=null
+ - UnityEngine.SpritePackingRotation, UnityEngine, Version=0.0.0.0, Culture=neutral,
+ PublicKeyToken=null
+ - UnityEngine.TextureFormat, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - System.IntPtr, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
--- !u!1 &2119731355
GameObject:
m_ObjectHideFlags: 0
@@ -10012,9 +10051,3 @@ CanvasRenderer:
Transform:
m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2}
m_PrefabInternal: {fileID: 1646090254}
---- !u!114 &2134815028 stripped
-MonoBehaviour:
- m_PrefabParentObject: {fileID: 11493126, guid: 49031c561e16d4fcf91c12153f8e0b25,
- type: 2}
- m_PrefabInternal: {fileID: 1646090254}
- m_Script: {fileID: 11500000, guid: ba19c26c1ba7243d2b57ebc4329cc7c6, type: 3}
diff --git a/Assets/Tests/FungusScript/FungusTests.unity.meta b/Assets/Tests/Lua/FungusTests.unity.meta
similarity index 100%
rename from Assets/Tests/FungusScript/FungusTests.unity.meta
rename to Assets/Tests/Lua/FungusTests.unity.meta
diff --git a/Assets/Tests/FungusScript/ScriptingTests.unity b/Assets/Tests/Lua/LuaTests.unity
similarity index 97%
rename from Assets/Tests/FungusScript/ScriptingTests.unity
rename to Assets/Tests/Lua/LuaTests.unity
index 66ac31b1..7afc69d2 100644
--- a/Assets/Tests/FungusScript/ScriptingTests.unity
+++ b/Assets/Tests/Lua/LuaTests.unity
@@ -226,7 +226,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 0}
+ lua: {fileID: 0}
luaFile: {fileID: 0}
luaScript: 'fungus.assert(dummycollection.stringList[1] == "hi")
@@ -292,6 +292,21 @@ MonoBehaviour:
- key: dummycollection
obj: {fileID: 367860753}
component: {fileID: 367860754}
+ boundTypes:
+ - UnityEngine.GameObject, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.PrimitiveType, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.Component, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - System.Type, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ - System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ - System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ - UnityEngine.SendMessageOptions, UnityEngine, Version=0.0.0.0, Culture=neutral,
+ PublicKeyToken=null
+ - UnityEngine.SceneManagement.Scene, UnityEngine, Version=0.0.0.0, Culture=neutral,
+ PublicKeyToken=null
+ - UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - System.Single, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ - Fungus.DummyCollection, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
+ - UnityEngine.Sprite, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
--- !u!1 &305346650
GameObject:
m_ObjectHideFlags: 0
@@ -339,7 +354,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 0}
+ lua: {fileID: 0}
luaFile: {fileID: 0}
luaScript: "-- Test the timeout works in fungus.waitfor\nlocal value = false\n\nfunction
fn()\n return value\nend\n\nt = fungus.time()\nfungus.waitfor(fn, 1)\nfungus.assert
@@ -587,7 +602,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 0}
+ lua: {fileID: 0}
luaFile: {fileID: 0}
luaScript: '-- Test storing persistant data
@@ -800,7 +815,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 0}
+ lua: {fileID: 0}
luaFile: {fileID: 0}
luaScript: '-- Test time functions and time scaling
@@ -827,7 +842,7 @@ MonoBehaviour:
-- Should take 2 seconds in realtime to wait for 1 second
- unity.fungusscript.timeScale = 0.5
+ unity.lua.timeScale = 0.5
t= fungus.time()
@@ -956,7 +971,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 0}
+ lua: {fileID: 0}
luaFile: {fileID: 0}
luaScript: '-- Test if module importing via require works
@@ -1313,7 +1328,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 0}
+ lua: {fileID: 0}
luaFile: {fileID: 0}
luaScript: '-- Test string table localisation system
@@ -1410,7 +1425,7 @@ MonoBehaviour:
repeatEveryFrame: 1
hasFailed: 0
executeMethods: 2
- fungusScript: {fileID: 0}
+ lua: {fileID: 0}
luaFile: {fileID: 0}
luaScript: '-- Test if object binding works
diff --git a/Assets/Tests/FungusScript/ScriptingTests.unity.meta b/Assets/Tests/Lua/LuaTests.unity.meta
similarity index 100%
rename from Assets/Tests/FungusScript/ScriptingTests.unity.meta
rename to Assets/Tests/Lua/LuaTests.unity.meta