Browse Source

Handle case of missing script in LuaBindings component picker

master
Chris Gregan 9 years ago
parent
commit
26910afc61
  1. 7
      Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaBindingsEditor.cs

7
Assets/Fungus/Thirdparty/FungusLua/Scripts/Editor/LuaBindingsEditor.cs vendored

@ -98,6 +98,13 @@ namespace Fungus
selected = count; selected = count;
} }
if (component == null ||
component.GetType() == null)
{
// Missing script?
continue;
}
string componentName = component.GetType().ToString().Replace("UnityEngine.", ""); string componentName = component.GetType().ToString().Replace("UnityEngine.", "");
options.Add(componentName); options.Add(componentName);

Loading…
Cancel
Save