Browse Source

Merge pull request #426 from FungusGames/rename-fungus-script

Renamed FungusScript to Lua
master
Chris Gregan 9 years ago
parent
commit
a9ab5d698c
  1. 0
      Assets/Fungus/Lua.meta
  2. 0
      Assets/Fungus/Lua/Resources.meta
  3. 0
      Assets/Fungus/Lua/Resources/Lua.meta
  4. 22
      Assets/Fungus/Lua/Resources/Lua/fungus.txt
  5. 0
      Assets/Fungus/Lua/Resources/Lua/fungus.txt.meta
  6. 0
      Assets/Fungus/Lua/Resources/Lua/inspect.txt
  7. 0
      Assets/Fungus/Lua/Resources/Lua/inspect.txt.meta
  8. 0
      Assets/Fungus/Lua/Resources/Prefabs.meta
  9. 4
      Assets/Fungus/Lua/Resources/Prefabs/Lua.prefab
  10. 0
      Assets/Fungus/Lua/Resources/Prefabs/Lua.prefab.meta
  11. 0
      Assets/Fungus/Lua/Resources/Prefabs/LuaBindings.prefab
  12. 0
      Assets/Fungus/Lua/Resources/Prefabs/LuaBindings.prefab.meta
  13. 0
      Assets/Fungus/Lua/Resources/Prefabs/RunLua.prefab
  14. 0
      Assets/Fungus/Lua/Resources/Prefabs/RunLua.prefab.meta
  15. 0
      Assets/Fungus/Lua/Resources/Types.meta
  16. 0
      Assets/Fungus/Lua/Resources/Types/ExtensionTypes.txt
  17. 0
      Assets/Fungus/Lua/Resources/Types/ExtensionTypes.txt.meta
  18. 4
      Assets/Fungus/Lua/Resources/Types/RegisterTypes.txt
  19. 0
      Assets/Fungus/Lua/Resources/Types/RegisterTypes.txt.meta
  20. 0
      Assets/Fungus/Lua/Scripts.meta
  21. 0
      Assets/Fungus/Lua/Scripts/Editor.meta
  22. 0
      Assets/Fungus/Lua/Scripts/Editor/DropDownControl.cs
  23. 0
      Assets/Fungus/Lua/Scripts/Editor/DropDownControl.cs.meta
  24. 0
      Assets/Fungus/Lua/Scripts/Editor/LuaBindingsEditor.cs
  25. 0
      Assets/Fungus/Lua/Scripts/Editor/LuaBindingsEditor.cs.meta
  26. 4
      Assets/Fungus/Lua/Scripts/Editor/LuaEditor.cs
  27. 0
      Assets/Fungus/Lua/Scripts/Editor/LuaEditor.cs.meta
  28. 6
      Assets/Fungus/Lua/Scripts/Editor/MenuItems.cs
  29. 0
      Assets/Fungus/Lua/Scripts/Editor/MenuItems.cs.meta
  30. 6
      Assets/Fungus/Lua/Scripts/Editor/RunLuaEditor.cs
  31. 0
      Assets/Fungus/Lua/Scripts/Editor/RunLuaEditor.cs.meta
  32. 0
      Assets/Fungus/Lua/Scripts/FungusPrefs.cs
  33. 0
      Assets/Fungus/Lua/Scripts/FungusPrefs.cs.meta
  34. 36
      Assets/Fungus/Lua/Scripts/Lua.cs
  35. 0
      Assets/Fungus/Lua/Scripts/Lua.cs.meta
  36. 4
      Assets/Fungus/Lua/Scripts/LuaBindings.cs
  37. 0
      Assets/Fungus/Lua/Scripts/LuaBindings.cs.meta
  38. 0
      Assets/Fungus/Lua/Scripts/PODTypeFactory.cs
  39. 0
      Assets/Fungus/Lua/Scripts/PODTypeFactory.cs.meta
  40. 22
      Assets/Fungus/Lua/Scripts/RunLua.cs
  41. 0
      Assets/Fungus/Lua/Scripts/RunLua.cs.meta
  42. 0
      Assets/Fungus/Lua/Thirdparty.meta
  43. 0
      Assets/Fungus/Lua/Thirdparty/FungusExtensions.meta
  44. 29
      Assets/Fungus/Lua/Thirdparty/FungusExtensions/ExecuteLua.cs
  45. 0
      Assets/Fungus/Lua/Thirdparty/FungusExtensions/ExecuteLua.cs.meta
  46. 10
      Assets/Fungus/Lua/Thirdparty/FungusExtensions/LuaExtensions.cs
  47. 4
      Assets/Fungus/Lua/Thirdparty/FungusExtensions/LuaExtensions.cs.meta
  48. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp.meta
  49. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/LICENSE
  50. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/LICENSE.meta
  51. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.dll
  52. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.dll.meta
  53. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.pdb
  54. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.pdb.meta
  55. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.dll
  56. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.dll.meta
  57. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.pdb
  58. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.pdb.meta
  59. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.xml
  60. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.xml.meta
  61. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.dll
  62. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.dll.meta
  63. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.pdb
  64. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.pdb.meta
  65. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.pdb
  66. 0
      Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.pdb.meta
  67. 0
      Assets/Fungus/Lua/Thirdparty/TaskManager.meta
  68. 0
      Assets/Fungus/Lua/Thirdparty/TaskManager/TaskManager.cs
  69. 0
      Assets/Fungus/Lua/Thirdparty/TaskManager/TaskManager.cs.meta
  70. 0
      Assets/FungusExamples/Lua.meta
  71. 0
      Assets/FungusExamples/Lua/Narrative.unity
  72. 0
      Assets/FungusExamples/Lua/Narrative.unity.meta
  73. 20
      Assets/FungusExamples/Lua/Trigger.unity
  74. 0
      Assets/FungusExamples/Lua/Trigger.unity.meta
  75. 0
      Assets/Tests/Lua.meta
  76. 0
      Assets/Tests/Lua/DummyCollection.cs
  77. 0
      Assets/Tests/Lua/DummyCollection.cs.meta
  78. 179
      Assets/Tests/Lua/FungusTests.unity
  79. 0
      Assets/Tests/Lua/FungusTests.unity.meta
  80. 31
      Assets/Tests/Lua/LuaTests.unity
  81. 0
      Assets/Tests/Lua/LuaTests.unity.meta

0
Assets/Fungus/FungusScript.meta → Assets/Fungus/Lua.meta

0
Assets/Fungus/FungusScript/Resources.meta → Assets/Fungus/Lua/Resources.meta

0
Assets/Fungus/FungusScript/Resources/Lua.meta → Assets/Fungus/Lua/Resources/Lua.meta

22
Assets/Fungus/FungusScript/Resources/Lua/fungus.txt → Assets/Fungus/Lua/Resources/Lua/fungus.txt

@ -16,15 +16,15 @@ end
------- -------
-- Returns the absolute time -- 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() function M.time()
return unity.fungusscript.getTime() return unity.lua.getTime()
end end
-- Returns the delta time this frame -- 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() function M.deltatime()
return unity.fungusscript.getDeltaTime() return unity.lua.getDeltaTime()
end end
------------- -------------
@ -57,7 +57,7 @@ end
function M.run(enumerator) function M.run(enumerator)
-- If the parameter isn't an enumerator then CreateTask will fail -- If the parameter isn't an enumerator then CreateTask will fail
local status, err = pcall( function() local status, err = pcall( function()
local task = unity.fungusscript.RunUnityCoroutine(enumerator) local task = unity.lua.RunUnityCoroutine(enumerator)
end) end)
if (not status) then if (not status) then
@ -70,7 +70,7 @@ end
function M.runwait(enumerator) function M.runwait(enumerator)
-- If the parameter isn't an enumerator then CreateTask will fail -- If the parameter isn't an enumerator then CreateTask will fail
local status, err = pcall( function() local status, err = pcall( function()
local task = unity.fungusscript.RunUnityCoroutine(enumerator) local task = unity.lua.RunUnityCoroutine(enumerator)
while (task != nil and task.Running) do while (task != nil and task.Running) do
coroutine.yield(); coroutine.yield();
end end
@ -88,18 +88,18 @@ end
-- Set active language for string table -- Set active language for string table
function M.setlanguage(languageCode) function M.setlanguage(languageCode)
unity.fungusscript.activeLanguage = languageCode unity.lua.activeLanguage = languageCode
end end
-- Get a named string from the string table -- Get a named string from the string table
function M.getstring(key) function M.getstring(key)
return unity.fungusscript.GetString(key) return unity.lua.GetString(key)
end end
-- Substitutes variables and localisation strings into a piece of text -- Substitutes variables and localisation strings into a piece of text
-- e.g. v = 10, "Subbed value is [$v]" => "Subbed value is 10" -- e.g. v = 10, "Subbed value is [$v]" => "Subbed value is 10"
function M.sub(text) function M.sub(text)
return unity.fungusscript.substitute(text) return unity.lua.substitute(text)
end end
-------------------- --------------------
@ -211,7 +211,7 @@ function M.menu(text, callback, interactive)
-- Do variable substitution before displaying text -- Do variable substitution before displaying text
local subbed = fungus.sub(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 end
-- Display a timer during which the player has to choose an option. -- 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. -- callback: Function to call if the timer expires before an option is selected.
function M.menutimer(duration, callback) function M.menutimer(duration, callback)
assert(M.menuoptions.menudialog, "menudialog must not be nil") 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) fungus.runwait(e)
end end

0
Assets/Fungus/FungusScript/Resources/Lua/fungus.txt.meta → Assets/Fungus/Lua/Resources/Lua/fungus.txt.meta

0
Assets/Fungus/FungusScript/Resources/Lua/inspect.txt → Assets/Fungus/Lua/Resources/Lua/inspect.txt

0
Assets/Fungus/FungusScript/Resources/Lua/inspect.txt.meta → Assets/Fungus/Lua/Resources/Lua/inspect.txt.meta

0
Assets/Fungus/FungusScript/Resources/Prefabs.meta → Assets/Fungus/Lua/Resources/Prefabs.meta

4
Assets/Fungus/FungusScript/Resources/Prefabs/FungusScript.prefab → Assets/Fungus/Lua/Resources/Prefabs/Lua.prefab

@ -10,7 +10,7 @@ GameObject:
- 4: {fileID: 495584} - 4: {fileID: 495584}
- 114: {fileID: 11493126} - 114: {fileID: 11493126}
m_Layer: 0 m_Layer: 0
m_Name: FungusScript m_Name: Lua
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@ -45,8 +45,6 @@ MonoBehaviour:
timeScale: -1 timeScale: -1
registerTypes: registerTypes:
- {fileID: 4900000, guid: 9c3ab7a98d51241bbb499643399fa761, type: 3} - {fileID: 4900000, guid: 9c3ab7a98d51241bbb499643399fa761, type: 3}
registerExtensionTypes:
- {fileID: 4900000, guid: 2978c0ed6806b42629d2bf7d0d1f220c, type: 3}
--- !u!1001 &100100000 --- !u!1001 &100100000
Prefab: Prefab:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1

0
Assets/Fungus/FungusScript/Resources/Prefabs/FungusScript.prefab.meta → Assets/Fungus/Lua/Resources/Prefabs/Lua.prefab.meta

0
Assets/Fungus/FungusScript/Resources/Prefabs/LuaBindings.prefab → Assets/Fungus/Lua/Resources/Prefabs/LuaBindings.prefab

0
Assets/Fungus/FungusScript/Resources/Prefabs/LuaBindings.prefab.meta → Assets/Fungus/Lua/Resources/Prefabs/LuaBindings.prefab.meta

0
Assets/Fungus/FungusScript/Resources/Prefabs/RunLua.prefab → Assets/Fungus/Lua/Resources/Prefabs/RunLua.prefab

0
Assets/Fungus/FungusScript/Resources/Prefabs/RunLua.prefab.meta → Assets/Fungus/Lua/Resources/Prefabs/RunLua.prefab.meta

0
Assets/Fungus/FungusScript/Resources/Types.meta → Assets/Fungus/Lua/Resources/Types.meta

0
Assets/Fungus/FungusScript/Resources/Types/ExtensionTypes.txt → Assets/Fungus/Lua/Resources/Types/ExtensionTypes.txt

0
Assets/Fungus/FungusScript/Resources/Types/ExtensionTypes.txt.meta → Assets/Fungus/Lua/Resources/Types/ExtensionTypes.txt.meta

4
Assets/Fungus/FungusScript/Resources/Types/RegisterTypes.txt → Assets/Fungus/Lua/Resources/Types/RegisterTypes.txt

@ -18,7 +18,7 @@ Fungus.FacingDirection
Fungus.FloatVariable Fungus.FloatVariable
Fungus.Flowchart Fungus.Flowchart
Fungus.FungusPrefs Fungus.FungusPrefs
Fungus.FungusScript Fungus.Lua
Fungus.GameObjectVariable Fungus.GameObjectVariable
Fungus.IntegerVariable Fungus.IntegerVariable
Fungus.Label Fungus.Label
@ -95,4 +95,4 @@ UnityEngine.VerticalWrapMode, UnityEngine, Version=0.0.0.0, Culture=neutral, Pub
# Extension types # Extension types
E:Fungus.FungusScriptExtensions E:Fungus.LuaExtensions

0
Assets/Fungus/FungusScript/Resources/Types/RegisterTypes.txt.meta → Assets/Fungus/Lua/Resources/Types/RegisterTypes.txt.meta

0
Assets/Fungus/FungusScript/Scripts.meta → Assets/Fungus/Lua/Scripts.meta

0
Assets/Fungus/FungusScript/Scripts/Editor.meta → Assets/Fungus/Lua/Scripts/Editor.meta

0
Assets/Fungus/FungusScript/Scripts/Editor/DropDownControl.cs → Assets/Fungus/Lua/Scripts/Editor/DropDownControl.cs

0
Assets/Fungus/FungusScript/Scripts/Editor/DropDownControl.cs.meta → Assets/Fungus/Lua/Scripts/Editor/DropDownControl.cs.meta

0
Assets/Fungus/FungusScript/Scripts/Editor/LuaBindingsEditor.cs → Assets/Fungus/Lua/Scripts/Editor/LuaBindingsEditor.cs

0
Assets/Fungus/FungusScript/Scripts/Editor/LuaBindingsEditor.cs.meta → Assets/Fungus/Lua/Scripts/Editor/LuaBindingsEditor.cs.meta

4
Assets/Fungus/FungusScript/Scripts/Editor/FungusScriptEditor.cs → Assets/Fungus/Lua/Scripts/Editor/LuaEditor.cs

@ -10,8 +10,8 @@ using System.IO;
namespace Fungus namespace Fungus
{ {
[CustomEditor (typeof(FungusScript))] [CustomEditor (typeof(Lua))]
public class FungusScriptEditor : Editor public class LuaEditor : Editor
{ {
protected SerializedProperty registerTypesProp; protected SerializedProperty registerTypesProp;
protected ReorderableList registerTypeList; protected ReorderableList registerTypeList;

0
Assets/Fungus/FungusScript/Scripts/Editor/FungusScriptEditor.cs.meta → Assets/Fungus/Lua/Scripts/Editor/LuaEditor.cs.meta

6
Assets/Fungus/FungusScript/Scripts/Editor/MenuItems.cs → Assets/Fungus/Lua/Scripts/Editor/MenuItems.cs

@ -8,10 +8,10 @@ namespace Fungus
public class MenuItems public class MenuItems
{ {
[MenuItem("Tools/Fungus/Create/Fungus Script", false, 2000)] [MenuItem("Tools/Fungus/Create/Lua", false, 2000)]
static void CreateFungusScript() static void CreateLua()
{ {
SpawnPrefab("Prefabs/FungusScript", false); SpawnPrefab("Prefabs/Lua", false);
} }
[MenuItem("Tools/Fungus/Create/Lua Bindings", false, 2001)] [MenuItem("Tools/Fungus/Create/Lua Bindings", false, 2001)]

0
Assets/Fungus/FungusScript/Scripts/Editor/MenuItems.cs.meta → Assets/Fungus/Lua/Scripts/Editor/MenuItems.cs.meta

6
Assets/Fungus/FungusScript/Scripts/Editor/RunLuaEditor.cs → 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."); private readonly GUIContent m_GUIRepeatExecuteFrameGuiContent = new GUIContent("Repeat execution", "Should the execution be repeated.");
#endregion #endregion
protected SerializedProperty fungusScriptProp; protected SerializedProperty luaEnvironmentProp;
protected SerializedProperty runAsCoroutineProp; protected SerializedProperty runAsCoroutineProp;
protected SerializedProperty luaFileProp; protected SerializedProperty luaFileProp;
protected SerializedProperty luaScriptProp; protected SerializedProperty luaScriptProp;
@ -42,7 +42,7 @@ namespace Fungus
public virtual void OnEnable() public virtual void OnEnable()
{ {
fungusScriptProp = serializedObject.FindProperty("fungusScript"); luaEnvironmentProp = serializedObject.FindProperty("luaEnvironment");
runAsCoroutineProp = serializedObject.FindProperty("runAsCoroutine"); runAsCoroutineProp = serializedObject.FindProperty("runAsCoroutine");
luaFileProp = serializedObject.FindProperty("luaFile"); luaFileProp = serializedObject.FindProperty("luaFile");
luaScriptProp = serializedObject.FindProperty("luaScript"); luaScriptProp = serializedObject.FindProperty("luaScript");
@ -103,7 +103,7 @@ namespace Fungus
serializedObject.Update(); serializedObject.Update();
EditorGUILayout.PropertyField(fungusScriptProp); EditorGUILayout.PropertyField(luaEnvironmentProp);
EditorGUILayout.PropertyField(runAsCoroutineProp); EditorGUILayout.PropertyField(runAsCoroutineProp);
EditorGUILayout.PropertyField(useFungusModuleProp); EditorGUILayout.PropertyField(useFungusModuleProp);

0
Assets/Fungus/FungusScript/Scripts/Editor/RunLuaEditor.cs.meta → Assets/Fungus/Lua/Scripts/Editor/RunLuaEditor.cs.meta

0
Assets/Fungus/FungusScript/Scripts/FungusPrefs.cs → Assets/Fungus/Lua/Scripts/FungusPrefs.cs

0
Assets/Fungus/FungusScript/Scripts/FungusPrefs.cs.meta → Assets/Fungus/Lua/Scripts/FungusPrefs.cs.meta

36
Assets/Fungus/FungusScript/Scripts/FungusScript.cs → Assets/Fungus/Lua/Scripts/Lua.cs

@ -13,17 +13,17 @@ using MoonSharp.RemoteDebugger;
namespace Fungus namespace Fungus
{ {
public class FungusScript : MonoBehaviour public class Lua : MonoBehaviour
{ {
/// <summary> /// <summary>
/// Custom file loader for MoonSharp that loads in all Lua scripts in the project. /// Custom file loader for MoonSharp that loads in all Lua scripts in the project.
/// Scripts must be placed in a Resources/Lua directory. /// Scripts must be placed in a Resources/Lua directory.
/// </summary> /// </summary>
protected class FungusScriptLoader : ScriptLoaderBase protected class LuaScriptLoader : ScriptLoaderBase
{ {
// Give the script loader access to the list of accessible Lua Modules. // Give the script loader access to the list of accessible Lua Modules.
private IEnumerable<TextAsset> luaScripts; private IEnumerable<TextAsset> luaScripts;
public FungusScriptLoader(IEnumerable<TextAsset> luaScripts) public LuaScriptLoader(IEnumerable<TextAsset> luaScripts)
{ {
this.luaScripts = luaScripts; this.luaScripts = luaScripts;
} }
@ -63,6 +63,26 @@ namespace Fungus
} }
} }
/// <summary>
/// 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.
/// </summary>
public static Lua GetLua()
{
Lua lua = GameObject.FindObjectOfType<Lua>();
if (lua == null)
{
GameObject prefab = Resources.Load<GameObject>("Prefabs/Lua");
if (prefab != null)
{
GameObject go = Instantiate(prefab) as GameObject;
go.name = "Lua";
lua = go.GetComponent<Lua>();
}
}
return lua;
}
protected Script interpreter; protected Script interpreter;
/// <summary> /// <summary>
@ -90,7 +110,7 @@ namespace Fungus
/// <summary> /// <summary>
/// Time scale factor to apply when running Lua scripts. /// 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. /// 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. /// If negative, then GetTime() and GetDeltaTime() return the same values as the standard Time class.
/// </summary> /// </summary>
@ -160,7 +180,7 @@ namespace Fungus
protected virtual void InitLuaScriptFiles() protected virtual void InitLuaScriptFiles()
{ {
object[] result = Resources.LoadAll("Lua", typeof(TextAsset)); object[] result = Resources.LoadAll("Lua", typeof(TextAsset));
interpreter.Options.ScriptLoader = new FungusScriptLoader(result.OfType<TextAsset>()); interpreter.Options.ScriptLoader = new LuaScriptLoader(result.OfType<TextAsset>());
} }
/// <summary> /// <summary>
@ -249,8 +269,8 @@ namespace Fungus
UserData.RegisterType(typeof(PODTypeFactory)); UserData.RegisterType(typeof(PODTypeFactory));
unityTable["factory"] = UserData.CreateStatic(typeof(PODTypeFactory)); unityTable["factory"] = UserData.CreateStatic(typeof(PODTypeFactory));
// This FungusScript object // This Lua object
unityTable["fungusscript"] = this; unityTable["lua"] = this;
// Provide access to the Unity Test Tools (if available). // Provide access to the Unity Test Tools (if available).
Type testType = Type.GetType("IntegrationTest"); Type testType = Type.GetType("IntegrationTest");
@ -518,7 +538,7 @@ namespace Fungus
/// <summary> /// <summary>
/// Starts a standard Unity coroutine. /// 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. /// stop all active coroutines later.
/// </summary> /// </summary>
protected virtual IEnumerator RunUnityCoroutineImpl(IEnumerator coroutine) protected virtual IEnumerator RunUnityCoroutineImpl(IEnumerator coroutine)

0
Assets/Fungus/FungusScript/Scripts/FungusScript.cs.meta → Assets/Fungus/Lua/Scripts/Lua.cs.meta

4
Assets/Fungus/FungusScript/Scripts/LuaBindings.cs → Assets/Fungus/Lua/Scripts/LuaBindings.cs

@ -11,7 +11,7 @@ namespace Fungus
/// <summary> /// <summary>
/// Base class for a component which registers Lua Bindings. /// 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. /// from LuaBindingsBase and calls them to add their bindings.
/// </summary> /// </summary>
public abstract class LuaBindingsBase : MonoBehaviour public abstract class LuaBindingsBase : MonoBehaviour
@ -100,7 +100,7 @@ namespace Fungus
// Register types of bound object with MoonSharp // Register types of bound object with MoonSharp
foreach (string typeName in boundTypes) foreach (string typeName in boundTypes)
{ {
FungusScript.RegisterType(typeName); Lua.RegisterType(typeName);
} }
for (int i = 0; i < boundObjects.Count; ++i) for (int i = 0; i < boundObjects.Count; ++i)

0
Assets/Fungus/FungusScript/Scripts/LuaBindings.cs.meta → Assets/Fungus/Lua/Scripts/LuaBindings.cs.meta

0
Assets/Fungus/FungusScript/Scripts/PODTypeFactory.cs → Assets/Fungus/Lua/Scripts/PODTypeFactory.cs

0
Assets/Fungus/FungusScript/Scripts/PODTypeFactory.cs.meta → Assets/Fungus/Lua/Scripts/PODTypeFactory.cs.meta

22
Assets/Fungus/FungusScript/Scripts/RunLua.cs → Assets/Fungus/Lua/Scripts/RunLua.cs

@ -59,8 +59,8 @@ namespace Fungus
/// <summary> /// <summary>
/// The Lua script environment to use when executing. /// The Lua script environment to use when executing.
/// </summary> /// </summary>
[Tooltip("The Lua script environment to use when executing.")] [Tooltip("The Lua environment to use when executing.")]
public FungusScript fungusScript; public Lua luaEnvironment;
/// <summary> /// <summary>
/// Lua script file to execute. /// Lua script file to execute.
@ -103,14 +103,16 @@ namespace Fungus
public void Start() public void Start()
{ {
// If no FungusScript has been explicitly set then try to get one in the scene if (luaEnvironment == null)
if (fungusScript == null)
{ {
fungusScript = GetComponentInParent<FungusScript>(); // Create a Lua environment if none exists yet
luaEnvironment = Lua.GetLua();
} }
if (fungusScript == null)
if (luaEnvironment == null)
{ {
fungusScript = GameObject.FindObjectOfType<FungusScript>(); Debug.LogError("No Lua environment found");
return;
} }
// Cache a descriptive name to use in Lua error messages // Cache a descriptive name to use in Lua error messages
@ -289,9 +291,9 @@ namespace Fungus
/// </summary> /// </summary>
public virtual void Execute() public virtual void Execute()
{ {
if (fungusScript == null) if (luaEnvironment == null)
{ {
Debug.LogWarning("No FungusScript selected"); Debug.LogWarning("No Lua component selected");
} }
else else
{ {
@ -310,7 +312,7 @@ namespace Fungus
s += luaScript; s += luaScript;
} }
fungusScript.DoLuaString(s, friendlyName, runAsCoroutine); luaEnvironment.DoLuaString(s, friendlyName, runAsCoroutine);
} }
} }

0
Assets/Fungus/FungusScript/Scripts/RunLua.cs.meta → Assets/Fungus/Lua/Scripts/RunLua.cs.meta

0
Assets/Fungus/FungusScript/Thirdparty.meta → Assets/Fungus/Lua/Thirdparty.meta

0
Assets/Fungus/FungusScript/Thirdparty/FungusExtensions.meta → Assets/Fungus/Lua/Thirdparty/FungusExtensions.meta vendored

29
Assets/Fungus/FungusScript/Thirdparty/FungusExtensions/ExecuteLua.cs → Assets/Fungus/Lua/Thirdparty/FungusExtensions/ExecuteLua.cs vendored

@ -8,11 +8,11 @@ namespace Fungus
[CommandInfo("Scripting", [CommandInfo("Scripting",
"Execute Lua", "Execute Lua",
"Executes a Lua code chunk using a FungusScript object.")] "Executes a Lua code chunk using a Lua component.")]
public class ExecuteLua : Command public class ExecuteLua : Command
{ {
[Tooltip("FungusScript to use to execute this Lua script")] [Tooltip("Lua environment to use to execute this Lua script")]
public FungusScript fungusScript; public Lua luaEnvironment;
[TextArea(10,100)] [TextArea(10,100)]
[Tooltip("Lua script to execute. Use {$VarName} to insert a Flowchart variable in the Lua script.")] [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 // Cache a descriptive name to use in Lua error messages
friendlyName = gameObject.name + "." + parentBlock.blockName + "." + "ExecuteLua #" + commandIndex.ToString(); friendlyName = gameObject.name + "." + parentBlock.blockName + "." + "ExecuteLua #" + commandIndex.ToString();
if (luaEnvironment == null)
{
luaEnvironment = Lua.GetLua();
}
} }
public override void OnEnter() public override void OnEnter()
{ {
if (fungusScript == null) // 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)
{ {
Debug.LogWarning("No FungusScript object selected"); luaEnvironment = Lua.GetLua();
}
if (luaEnvironment == null)
{
Debug.LogError("No Lua environment found");
Continue(); Continue();
return; return;
} }
@ -59,7 +71,7 @@ namespace Fungus
string subbed = s + GetFlowchart().SubstituteVariables(luaScript); string subbed = s + GetFlowchart().SubstituteVariables(luaScript);
fungusScript.DoLuaString(subbed, friendlyName, runAsCoroutine, (returnValue) => { luaEnvironment.DoLuaString(subbed, friendlyName, runAsCoroutine, (returnValue) => {
StoreReturnVariable(returnValue); StoreReturnVariable(returnValue);
if (waitUntilFinished) if (waitUntilFinished)
{ {
@ -138,11 +150,6 @@ namespace Fungus
public override string GetSummary() public override string GetSummary()
{ {
if (fungusScript == null)
{
return "Error: No FungusScript object selected";
}
return luaScript; return luaScript;
} }

0
Assets/Fungus/FungusScript/Thirdparty/FungusExtensions/ExecuteLua.cs.meta → Assets/Fungus/Lua/Thirdparty/FungusExtensions/ExecuteLua.cs.meta vendored

10
Assets/Fungus/FungusScript/Thirdparty/FungusExtensions/FungusScriptExtensions.cs → Assets/Fungus/Lua/Thirdparty/FungusExtensions/LuaExtensions.cs vendored

@ -7,13 +7,13 @@ using MoonSharp.Interpreter;
namespace Fungus namespace Fungus
{ {
public static class FungusScriptExtensions public static class LuaExtensions
{ {
/// <summary> /// <summary>
/// Extension for MenuDialog that allows AddOption to call a Lua function when an option is selected. /// Extension for MenuDialog that allows AddOption to call a Lua function when an option is selected.
/// </summary> /// </summary>
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; bool addedOption = false;
foreach (Button button in menuDialog.cachedButtons) foreach (Button button in menuDialog.cachedButtons)
@ -41,7 +41,7 @@ namespace Fungus
if (callBack != null) if (callBack != null)
{ {
fungusScript.RunLuaCoroutine(callBack, text); lua.RunLuaCoroutine(callBack, text);
} }
}); });
@ -56,7 +56,7 @@ namespace Fungus
/// <summary> /// <summary>
/// Extension for MenuDialog that allows ShowTimer to call a Lua function when the timer expires. /// Extension for MenuDialog that allows ShowTimer to call a Lua function when the timer expires.
/// </summary> /// </summary>
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 || if (menuDialog.cachedSlider == null ||
duration <= 0f) duration <= 0f)
@ -89,7 +89,7 @@ namespace Fungus
if (callBack != null) if (callBack != null)
{ {
fungusScript.RunLuaCoroutine(callBack, "menutimer"); lua.RunLuaCoroutine(callBack, "menutimer");
} }
} }
} }

4
Assets/Fungus/FungusScript/Thirdparty/FungusExtensions/FungusScriptExtensions.cs.meta → Assets/Fungus/Lua/Thirdparty/FungusExtensions/LuaExtensions.cs.meta vendored

@ -1,6 +1,6 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: d3cdbb71635f4406baec64f33d24514f guid: 998f811805a17465ba6720248632ec01
timeCreated: 1456230091 timeCreated: 1459502744
licenseType: Free licenseType: Free
MonoImporter: MonoImporter:
serializedVersion: 2 serializedVersion: 2

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp.meta → Assets/Fungus/Lua/Thirdparty/MoonSharp.meta vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/LICENSE → Assets/Fungus/Lua/Thirdparty/MoonSharp/LICENSE vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/LICENSE.meta → Assets/Fungus/Lua/Thirdparty/MoonSharp/LICENSE.meta vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Hardwire.dll → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.dll vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Hardwire.dll.meta → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.dll.meta vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Hardwire.pdb → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.pdb vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Hardwire.pdb.meta → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Hardwire.pdb.meta vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.dll → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.dll vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.dll.meta → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.dll.meta vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.pdb → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.pdb vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.pdb.meta → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.pdb.meta vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.xml → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.xml vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.Interpreter.xml.meta → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.Interpreter.xml.meta vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.dll → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.dll vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.dll.meta → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.dll.meta vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.pdb → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.pdb vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.pdb.meta → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.RemoteDebugger.pdb.meta vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.pdb → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.pdb vendored

0
Assets/Fungus/FungusScript/Thirdparty/MoonSharp/MoonSharp.pdb.meta → Assets/Fungus/Lua/Thirdparty/MoonSharp/MoonSharp.pdb.meta vendored

0
Assets/Fungus/FungusScript/Thirdparty/TaskManager.meta → Assets/Fungus/Lua/Thirdparty/TaskManager.meta vendored

0
Assets/Fungus/FungusScript/Thirdparty/TaskManager/TaskManager.cs → Assets/Fungus/Lua/Thirdparty/TaskManager/TaskManager.cs vendored

0
Assets/Fungus/FungusScript/Thirdparty/TaskManager/TaskManager.cs.meta → Assets/Fungus/Lua/Thirdparty/TaskManager/TaskManager.cs.meta vendored

0
Assets/FungusExamples/FungusScript.meta → Assets/FungusExamples/Lua.meta

0
Assets/FungusExamples/FungusScript/Narrative.unity → Assets/FungusExamples/Lua/Narrative.unity

0
Assets/FungusExamples/FungusScript/Narrative.unity.meta → Assets/FungusExamples/Lua/Narrative.unity.meta

20
Assets/FungusExamples/FungusScript/Trigger.unity → Assets/FungusExamples/Lua/Trigger.unity

@ -313,6 +313,7 @@ MonoBehaviour:
- key: saydialog - key: saydialog
obj: {fileID: 974098819} obj: {fileID: 974098819}
component: {fileID: 974098824} component: {fileID: 974098824}
boundTypes: []
--- !u!4 &775333279 --- !u!4 &775333279
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -368,11 +369,12 @@ MonoBehaviour:
y: -340 y: -340
width: 1114 width: 1114
height: 859 height: 859
selectedBlock: {fileID: 913136541} selectedBlock: {fileID: 0}
selectedCommands: selectedCommands: []
- {fileID: 913136542}
variables: [] variables: []
description: description: 'This example shows how to execute a Block in a Flowchart via a
Lua script executed by a trigger.'
stepPause: 0 stepPause: 0
colorCommands: 1 colorCommands: 1
hideComponents: 1 hideComponents: 1
@ -433,7 +435,7 @@ MonoBehaviour:
- {fileID: 913136542} - {fileID: 913136542}
--- !u!114 &913136542 --- !u!114 &913136542
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 913136538} m_GameObject: {fileID: 913136538}
@ -949,12 +951,6 @@ CanvasRenderer:
type: 2} type: 2}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1073217510} 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 --- !u!1 &1248777639
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1224,7 +1220,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 8192 executeMethods: 8192
fungusScript: {fileID: 1124933057} luaEnvironment: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: 'fungus.runblock(flowchart, "Start") luaScript: 'fungus.runblock(flowchart, "Start")

0
Assets/FungusExamples/FungusScript/Trigger.unity.meta → Assets/FungusExamples/Lua/Trigger.unity.meta

0
Assets/Tests/FungusScript.meta → Assets/Tests/Lua.meta

0
Assets/Tests/FungusScript/DummyCollection.cs → Assets/Tests/Lua/DummyCollection.cs

0
Assets/Tests/FungusScript/DummyCollection.cs.meta → Assets/Tests/Lua/DummyCollection.cs.meta

179
Assets/Tests/FungusScript/FungusTests.unity → Assets/Tests/Lua/FungusTests.unity

@ -142,6 +142,7 @@ MonoBehaviour:
- key: voiceover - key: voiceover
obj: {fileID: 8300000, guid: d2ab1fbe555d44e9e870311657856bdc, type: 3} obj: {fileID: 8300000, guid: d2ab1fbe555d44e9e870311657856bdc, type: 3}
component: {fileID: 0} component: {fileID: 0}
boundTypes: []
--- !u!1 &13683311 --- !u!1 &13683311
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -714,6 +715,7 @@ MonoBehaviour:
- key: menudialog - key: menudialog
obj: {fileID: 560555132} obj: {fileID: 560555132}
component: {fileID: 560555134} component: {fileID: 560555134}
boundTypes: []
--- !u!4 &36455799 stripped --- !u!4 &36455799 stripped
Transform: Transform:
m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2}
@ -764,7 +766,7 @@ MonoBehaviour:
itemId: 1 itemId: 1
errorMessage: errorMessage:
indentLevel: 0 indentLevel: 0
fungusScript: {fileID: 2134815028} luaEnvironment: {fileID: 0}
luaScript: '-- Test executing Lua script from a Fungus command luaScript: '-- Test executing Lua script from a Fungus command
@ -1101,7 +1103,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 0} luaEnvironment: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: '-- Check the starting value of StringVar luaScript: '-- Check the starting value of StringVar
@ -1356,6 +1358,7 @@ MonoBehaviour:
- key: optionbutton0 - key: optionbutton0
obj: {fileID: 876352038} obj: {fileID: 876352038}
component: {fileID: 876352041} component: {fileID: 876352041}
boundTypes: []
--- !u!1 &190681717 --- !u!1 &190681717
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1881,12 +1884,6 @@ Transform:
Transform: Transform:
m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2}
m_PrefabInternal: {fileID: 110499668} 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 --- !u!4 &316730978 stripped
Transform: Transform:
m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2}
@ -2172,10 +2169,10 @@ RectTransform:
- {fileID: 913989833} - {fileID: 913989833}
m_Father: {fileID: 465829170} m_Father: {fileID: 465829170}
m_RootOrder: 3 m_RootOrder: 3
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 650, y: -365}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &398057889 --- !u!114 &398057889
MonoBehaviour: MonoBehaviour:
@ -2377,10 +2374,10 @@ RectTransform:
- {fileID: 1088283066} - {fileID: 1088283066}
m_Father: {fileID: 465829170} m_Father: {fileID: 465829170}
m_RootOrder: 1 m_RootOrder: 1
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 650, y: -155}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &405820710 --- !u!114 &405820710
MonoBehaviour: MonoBehaviour:
@ -2526,7 +2523,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 0} luaEnvironment: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: '-- The "Do Test" block in the flowchart sets a bunch of flowchart variables 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_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -0.000018477, y: 191} 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} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &465829171 --- !u!114 &465829171
MonoBehaviour: MonoBehaviour:
@ -2720,6 +2717,7 @@ MonoBehaviour:
- key: flowchart - key: flowchart
obj: {fileID: 1983492490} obj: {fileID: 1983492490}
component: {fileID: 1983492495} component: {fileID: 1983492495}
boundTypes: []
--- !u!1 &507572619 --- !u!1 &507572619
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2753,10 +2751,10 @@ RectTransform:
- {fileID: 1446085149} - {fileID: 1446085149}
m_Father: {fileID: 465829170} m_Father: {fileID: 465829170}
m_RootOrder: 6 m_RootOrder: 6
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 650, y: -655}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 1300, y: 50}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &507572621 --- !u!114 &507572621
MonoBehaviour: MonoBehaviour:
@ -2908,7 +2906,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 0} luaEnvironment: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: "fungus.menuoptions.menudialog = menudialog\n\nfunction option1()\n fungus.fail()\nend\n\nfungus.menu(\"Option 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 1\", option1)\n\nfungus.assert(optionbutton0.activeSelf)\nfungus.clearmenu()\nfungus.assert(not
@ -2962,7 +2960,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 0} luaEnvironment: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: "-- Test the Menu Timer functionality\n\nfungus.menuoptions.menudialog luaScript: "-- Test the Menu Timer functionality\n\nfungus.menuoptions.menudialog
= menudialog\n\n-- Called if user clicks on menu option\nfunction option1()\n = menudialog\n\n-- Called if user clicks on menu option\nfunction option1()\n
@ -3176,10 +3174,10 @@ RectTransform:
- {fileID: 913529610} - {fileID: 913529610}
m_Father: {fileID: 465829170} m_Father: {fileID: 465829170}
m_RootOrder: 2 m_RootOrder: 2
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 650, y: -260}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &625261051 --- !u!114 &625261051
MonoBehaviour: MonoBehaviour:
@ -3466,12 +3464,6 @@ Transform:
Transform: Transform:
m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2}
m_PrefabInternal: {fileID: 726346786} 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 --- !u!1 &715595886
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -3505,10 +3497,10 @@ RectTransform:
- {fileID: 863130403} - {fileID: 863130403}
m_Father: {fileID: 465829170} m_Father: {fileID: 465829170}
m_RootOrder: 4 m_RootOrder: 4
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 650, y: -470}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &715595888 --- !u!114 &715595888
MonoBehaviour: MonoBehaviour:
@ -3655,6 +3647,7 @@ MonoBehaviour:
- key: transform - key: transform
obj: {fileID: 328064332} obj: {fileID: 328064332}
component: {fileID: 328064333} component: {fileID: 328064333}
boundTypes: []
--- !u!1001 &726346786 --- !u!1001 &726346786
Prefab: Prefab:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -4288,7 +4281,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 0} luaEnvironment: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: '-- Test getting and setting Fungus variables luaScript: '-- Test getting and setting Fungus variables
@ -4425,10 +4418,10 @@ RectTransform:
- {fileID: 884473401} - {fileID: 884473401}
m_Father: {fileID: 465829170} m_Father: {fileID: 465829170}
m_RootOrder: 0 m_RootOrder: 0
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 650, y: -50}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &876352040 --- !u!114 &876352040
MonoBehaviour: MonoBehaviour:
@ -4846,6 +4839,7 @@ MonoBehaviour:
- key: - key:
obj: {fileID: 0} obj: {fileID: 0}
component: {fileID: 0} component: {fileID: 0}
boundTypes: []
--- !u!1 &928936324 --- !u!1 &928936324
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -5100,7 +5094,7 @@ MonoBehaviour:
itemId: 1 itemId: 1
errorMessage: errorMessage:
indentLevel: 0 indentLevel: 0
fungusScript: {fileID: 715246548} luaEnvironment: {fileID: 0}
luaScript: return true luaScript: return true
useFungusModule: 1 useFungusModule: 1
runAsCoroutine: 0 runAsCoroutine: 0
@ -5166,7 +5160,8 @@ MonoBehaviour:
width: 1114 width: 1114
height: 859 height: 859
selectedBlock: {fileID: 942227027} selectedBlock: {fileID: 942227027}
selectedCommands: [] selectedCommands:
- {fileID: 942227025}
variables: variables:
- {fileID: 942227029} - {fileID: 942227029}
- {fileID: 942227035} - {fileID: 942227035}
@ -5216,7 +5211,7 @@ MonoBehaviour:
itemId: 4 itemId: 4
errorMessage: errorMessage:
indentLevel: 0 indentLevel: 0
fungusScript: {fileID: 715246548} luaEnvironment: {fileID: 0}
luaScript: return 1.0 luaScript: return 1.0
useFungusModule: 1 useFungusModule: 1
runAsCoroutine: 0 runAsCoroutine: 0
@ -5236,7 +5231,7 @@ MonoBehaviour:
itemId: 3 itemId: 3
errorMessage: errorMessage:
indentLevel: 0 indentLevel: 0
fungusScript: {fileID: 715246548} luaEnvironment: {fileID: 0}
luaScript: return 2 luaScript: return 2
useFungusModule: 1 useFungusModule: 1
runAsCoroutine: 0 runAsCoroutine: 0
@ -5256,7 +5251,7 @@ MonoBehaviour:
itemId: 2 itemId: 2
errorMessage: errorMessage:
indentLevel: 0 indentLevel: 0
fungusScript: {fileID: 715246548} luaEnvironment: {fileID: 0}
luaScript: return "a string" luaScript: return "a string"
useFungusModule: 1 useFungusModule: 1
runAsCoroutine: 0 runAsCoroutine: 0
@ -5332,7 +5327,7 @@ MonoBehaviour:
itemId: 6 itemId: 6
errorMessage: errorMessage:
indentLevel: 0 indentLevel: 0
fungusScript: {fileID: 715246548} luaEnvironment: {fileID: 0}
luaScript: 'local c = unity.factory.color(1, 0.5, 1, 1) luaScript: 'local c = unity.factory.color(1, 0.5, 1, 1)
@ -5355,7 +5350,7 @@ MonoBehaviour:
itemId: 7 itemId: 7
errorMessage: errorMessage:
indentLevel: 0 indentLevel: 0
fungusScript: {fileID: 715246548} luaEnvironment: {fileID: 0}
luaScript: return testgameobject luaScript: return testgameobject
useFungusModule: 1 useFungusModule: 1
runAsCoroutine: 0 runAsCoroutine: 0
@ -5403,7 +5398,7 @@ MonoBehaviour:
itemId: 9 itemId: 9
errorMessage: errorMessage:
indentLevel: 0 indentLevel: 0
fungusScript: {fileID: 715246548} luaEnvironment: {fileID: 0}
luaScript: return testmaterial luaScript: return testmaterial
useFungusModule: 1 useFungusModule: 1
runAsCoroutine: 0 runAsCoroutine: 0
@ -5437,7 +5432,7 @@ MonoBehaviour:
itemId: 10 itemId: 10
errorMessage: errorMessage:
indentLevel: 0 indentLevel: 0
fungusScript: {fileID: 715246548} luaEnvironment: {fileID: 0}
luaScript: return testgameobject luaScript: return testgameobject
useFungusModule: 1 useFungusModule: 1
runAsCoroutine: 0 runAsCoroutine: 0
@ -5471,7 +5466,7 @@ MonoBehaviour:
itemId: 11 itemId: 11
errorMessage: errorMessage:
indentLevel: 0 indentLevel: 0
fungusScript: {fileID: 715246548} luaEnvironment: {fileID: 0}
luaScript: return mushroom luaScript: return mushroom
useFungusModule: 1 useFungusModule: 1
runAsCoroutine: 0 runAsCoroutine: 0
@ -5505,7 +5500,7 @@ MonoBehaviour:
itemId: 12 itemId: 12
errorMessage: errorMessage:
indentLevel: 0 indentLevel: 0
fungusScript: {fileID: 715246548} luaEnvironment: {fileID: 0}
luaScript: 'local v = unity.factory.vector2(1,1) luaScript: 'local v = unity.factory.vector2(1,1)
@ -5542,7 +5537,7 @@ MonoBehaviour:
itemId: 13 itemId: 13
errorMessage: errorMessage:
indentLevel: 0 indentLevel: 0
fungusScript: {fileID: 715246548} luaEnvironment: {fileID: 0}
luaScript: return mousepointer luaScript: return mousepointer
useFungusModule: 1 useFungusModule: 1
runAsCoroutine: 0 runAsCoroutine: 0
@ -5576,7 +5571,7 @@ MonoBehaviour:
itemId: 14 itemId: 14
errorMessage: errorMessage:
indentLevel: 0 indentLevel: 0
fungusScript: {fileID: 715246548} luaEnvironment: {fileID: 0}
luaScript: 'local v = unity.factory.vector3(1,1,1) luaScript: 'local v = unity.factory.vector3(1,1,1)
return v' return v'
@ -6938,7 +6933,7 @@ RectTransform:
m_Father: {fileID: 1446085149} m_Father: {fileID: 1446085149}
m_RootOrder: 0 m_RootOrder: 0
m_AnchorMin: {x: 0, y: 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_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 10, y: 0} m_SizeDelta: {x: 10, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
@ -7570,7 +7565,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 294355417} luaEnvironment: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: "-- Test the Menu Timer functionality\n\nfungus.menuoptions.menudialog luaScript: "-- Test the Menu Timer functionality\n\nfungus.menuoptions.menudialog
= menudialog\n\n-- Called if user clicks on menu option\nfunction option1()\n = menudialog\n\n-- Called if user clicks on menu option\nfunction option1()\n
@ -8133,6 +8128,7 @@ MonoBehaviour:
- key: flowchart - key: flowchart
obj: {fileID: 807616582} obj: {fileID: 807616582}
component: {fileID: 807616590} component: {fileID: 807616590}
boundTypes: []
--- !u!1 &1738857300 --- !u!1 &1738857300
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -8432,10 +8428,10 @@ RectTransform:
- {fileID: 761668839} - {fileID: 761668839}
m_Father: {fileID: 465829170} m_Father: {fileID: 465829170}
m_RootOrder: 5 m_RootOrder: 5
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 650, y: -575}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 1300, y: 100}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1762200959 --- !u!114 &1762200959
MonoBehaviour: MonoBehaviour:
@ -8561,7 +8557,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3} m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
selectedFlowchart: {fileID: 942227028} selectedFlowchart: {fileID: 56584893}
--- !u!4 &1791050794 --- !u!4 &1791050794
Transform: Transform:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -8621,7 +8617,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 0} luaEnvironment: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: '-- Test Say Dialog integration luaScript: '-- Test Say Dialog integration
@ -9131,7 +9127,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!114 &1993284458 --- !u!114 &1993284458
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -9306,7 +9302,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 0} luaEnvironment: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: '-- Use a Fungus flowchart to show a character portrait luaScript: '-- Use a Fungus flowchart to show a character portrait
@ -9634,7 +9630,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 0} luaEnvironment: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: luaScript:
runAsCoroutine: 1 runAsCoroutine: 1
@ -9738,6 +9734,49 @@ MonoBehaviour:
- key: mousepointer - key: mousepointer
obj: {fileID: 2800000, guid: efe8aa62cc87f4b70b9272e4e8e06668, type: 3} obj: {fileID: 2800000, guid: efe8aa62cc87f4b70b9272e4e8e06668, type: 3}
component: {fileID: 0} 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 --- !u!1 &2119731355
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -10012,9 +10051,3 @@ CanvasRenderer:
Transform: Transform:
m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2} m_PrefabParentObject: {fileID: 495584, guid: 49031c561e16d4fcf91c12153f8e0b25, type: 2}
m_PrefabInternal: {fileID: 1646090254} 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}

0
Assets/Tests/FungusScript/FungusTests.unity.meta → Assets/Tests/Lua/FungusTests.unity.meta

31
Assets/Tests/FungusScript/ScriptingTests.unity → Assets/Tests/Lua/LuaTests.unity

@ -226,7 +226,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 0} lua: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: 'fungus.assert(dummycollection.stringList[1] == "hi") luaScript: 'fungus.assert(dummycollection.stringList[1] == "hi")
@ -292,6 +292,21 @@ MonoBehaviour:
- key: dummycollection - key: dummycollection
obj: {fileID: 367860753} obj: {fileID: 367860753}
component: {fileID: 367860754} 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 --- !u!1 &305346650
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -339,7 +354,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 0} lua: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: "-- Test the timeout works in fungus.waitfor\nlocal value = false\n\nfunction 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 fn()\n return value\nend\n\nt = fungus.time()\nfungus.waitfor(fn, 1)\nfungus.assert
@ -587,7 +602,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 0} lua: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: '-- Test storing persistant data luaScript: '-- Test storing persistant data
@ -800,7 +815,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 0} lua: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: '-- Test time functions and time scaling luaScript: '-- Test time functions and time scaling
@ -827,7 +842,7 @@ MonoBehaviour:
-- Should take 2 seconds in realtime to wait for 1 second -- Should take 2 seconds in realtime to wait for 1 second
unity.fungusscript.timeScale = 0.5 unity.lua.timeScale = 0.5
t= fungus.time() t= fungus.time()
@ -956,7 +971,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 0} lua: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: '-- Test if module importing via require works luaScript: '-- Test if module importing via require works
@ -1313,7 +1328,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 0} lua: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: '-- Test string table localisation system luaScript: '-- Test string table localisation system
@ -1410,7 +1425,7 @@ MonoBehaviour:
repeatEveryFrame: 1 repeatEveryFrame: 1
hasFailed: 0 hasFailed: 0
executeMethods: 2 executeMethods: 2
fungusScript: {fileID: 0} lua: {fileID: 0}
luaFile: {fileID: 0} luaFile: {fileID: 0}
luaScript: '-- Test if object binding works luaScript: '-- Test if object binding works

0
Assets/Tests/FungusScript/ScriptingTests.unity.meta → Assets/Tests/Lua/LuaTests.unity.meta

Loading…
Cancel
Save