|
|
@ -103,6 +103,8 @@ namespace Fungus |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|
protected virtual void InitTypes() |
|
|
|
protected virtual void InitTypes() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
bool isFungusInstalled = (Type.GetType("Fungus.Flowchart") != null); |
|
|
|
|
|
|
|
|
|
|
|
foreach (TextAsset textFile in registerTypes) |
|
|
|
foreach (TextAsset textFile in registerTypes) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (textFile == null) |
|
|
|
if (textFile == null) |
|
|
@ -119,6 +121,13 @@ namespace Fungus |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Don't register fungus types if the Fungus library is not present |
|
|
|
|
|
|
|
if (!isFungusInstalled && |
|
|
|
|
|
|
|
typeName.StartsWith("Fungus.")) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
LuaEnvironment.RegisterType(typeName); |
|
|
|
LuaEnvironment.RegisterType(typeName); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|