private static bool IsForbiddenType(Type type)
        {
            if (type.IsArray)
            {
                if (IsForbiddenType(type.GetElementType()))
                {
                    return(true);
                }
            }

            if (type.IsGenericType)
            {
                foreach (var gtype in type.GetGenericArguments())
                {
                    if (IsForbiddenType(gtype))
                    {
                        return(true);
                    }
                }
            }

            var typelist = LuaPrecompile.GetTypeList();

            if (!typelist.ContainsKey(type.FullName))
            {
                return(true);
            }

            return(false);
        }
        public static void BuildDelegateWrapperForAOT()
        {
            HashSet <Types> list         = new HashSet <Types>();
            HashSet <Type>  typeSearched = new HashSet <Type>();

            var typelist = LuaPrecompile.GetTypeList();

            foreach (var kvp in typelist)
            {
                GetDelTypes(list, kvp.Value, typeSearched);
            }

            var manmod  = CapsEditorUtils.__MOD__;
            var manidir = "Assets/Mods/" + manmod + "/LuaHubSub/";

            BuildDelegateWrapperForAOT(list, manidir + "CapsLuaDelegateWrapperAOT.cs");
        }