Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pangweiwei/slua
Browse files Browse the repository at this point in the history
  • Loading branch information
pangweiwei committed Sep 21, 2015
2 parents b5f9584 + 6605c07 commit 72aa26e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Assets/Slua/Editor/LuaCodeGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,9 @@ private void WriteFunctionAttr(StreamWriter file)
ConstructorInfo[] GetValidConstructor(Type t)
{
List<ConstructorInfo> ret = new List<ConstructorInfo>();
if (t.GetConstructor(Type.EmptyTypes) == null || t.IsAbstract)
if (t.GetConstructor(Type.EmptyTypes) == null && t.IsAbstract && t.IsSealed)
return ret.ToArray();
if (t.IsAbstract)
return ret.ToArray();
if (t.BaseType != null && t.BaseType.Name == "MonoBehaviour")
return ret.ToArray();
Expand Down

0 comments on commit 72aa26e

Please sign in to comment.