Browse Source

Fixed luautils won't work on FungusLua standalone #604

master
Christopher 8 years ago
parent
commit
ebd5776b27
  1. 10
      Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs

10
Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs vendored

@ -75,8 +75,6 @@ namespace Fungus
/// </summary> /// </summary>
protected virtual void InitTypes() protected virtual void InitTypes()
{ {
bool isFungusInstalled = (Type.GetType("Fungus.Flowchart") != null);
// Always register these FungusLua utilities // Always register these FungusLua utilities
LuaEnvironment.RegisterType("Fungus.PODTypeFactory"); LuaEnvironment.RegisterType("Fungus.PODTypeFactory");
LuaEnvironment.RegisterType("Fungus.FungusPrefs"); LuaEnvironment.RegisterType("Fungus.FungusPrefs");
@ -109,9 +107,7 @@ namespace Fungus
{ {
string typeName = entry.str.Trim(); string typeName = entry.str.Trim();
// Don't register fungus types if the Fungus library is not present if (Type.GetType(typeName) == null)
if (!isFungusInstalled &&
typeName.StartsWith("Fungus."))
{ {
continue; continue;
} }
@ -133,9 +129,7 @@ namespace Fungus
{ {
string typeName = entry.str.Trim(); string typeName = entry.str.Trim();
// Don't register fungus types if the Fungus library is not present if (Type.GetType(typeName) == null)
if (!isFungusInstalled &&
typeName.StartsWith("Fungus."))
{ {
continue; continue;
} }

Loading…
Cancel
Save