|
|
@ -62,7 +62,6 @@ namespace Fungus |
|
|
|
friendlyName = gameObject.name + "." + parentBlock.blockName + "." + "ExecuteLua #" + commandIndex.ToString(); |
|
|
|
friendlyName = gameObject.name + "." + parentBlock.blockName + "." + "ExecuteLua #" + commandIndex.ToString(); |
|
|
|
|
|
|
|
|
|
|
|
Flowchart flowchart = GetFlowchart(); |
|
|
|
Flowchart flowchart = GetFlowchart(); |
|
|
|
Debug.Assert(flowchart != null); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// See if a Lua Environment has been assigned to this Flowchart |
|
|
|
// See if a Lua Environment has been assigned to this Flowchart |
|
|
|
if (luaEnvironment == null) |
|
|
|
if (luaEnvironment == null) |
|
|
@ -83,10 +82,11 @@ namespace Fungus |
|
|
|
if (flowchart.luaBindingName != "") |
|
|
|
if (flowchart.luaBindingName != "") |
|
|
|
{ |
|
|
|
{ |
|
|
|
Table globals = luaEnvironment.Interpreter.Globals; |
|
|
|
Table globals = luaEnvironment.Interpreter.Globals; |
|
|
|
Debug.Assert(globals != null); |
|
|
|
if (globals != null) |
|
|
|
|
|
|
|
{ |
|
|
|
globals[flowchart.luaBindingName] = flowchart; |
|
|
|
globals[flowchart.luaBindingName] = flowchart; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Always initialise when playing in the editor. |
|
|
|
// Always initialise when playing in the editor. |
|
|
|
// Allows the user to edit the Lua script while the game is playing. |
|
|
|
// Allows the user to edit the Lua script while the game is playing. |
|
|
|