From 6605c0798d6ace69494c713a38cca72714666465 Mon Sep 17 00:00:00 2001 From: pangweiwei Date: Fri, 18 Sep 2015 20:42:52 +0800 Subject: [PATCH] revert and fix abstract class export --- Assets/Slua/Editor/LuaCodeGen.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/Slua/Editor/LuaCodeGen.cs b/Assets/Slua/Editor/LuaCodeGen.cs index 03620bb6..964cf977 100644 --- a/Assets/Slua/Editor/LuaCodeGen.cs +++ b/Assets/Slua/Editor/LuaCodeGen.cs @@ -1200,7 +1200,9 @@ private void WriteFunctionAttr(StreamWriter file) ConstructorInfo[] GetValidConstructor(Type t) { List ret = new List(); - 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();