using System.Collections; using System.Collections.Generic; using UnityEngine; using System; using XLua; public static class LuaGenEx { //lua中要使用到C#库的配置,比如C#标准库,或者Unity API,第三方库等。 [LuaCallCSharp] public static List LuaCallCSharp = new List() { typeof(System.Object), typeof(UnityEngine.Object), typeof(Vector2), typeof(Vector3), typeof(Vector4), typeof(Quaternion), typeof(Color), typeof(Ray), typeof(Bounds), typeof(Ray2D), typeof(Time), typeof(GameObject), typeof(Component), typeof(Behaviour), typeof(Transform), typeof(Resources), typeof(TextAsset), typeof(Keyframe), typeof(AnimationCurve), typeof(AnimationClip), typeof(MonoBehaviour), typeof(ParticleSystem), typeof(SkinnedMeshRenderer), typeof(Renderer), typeof(WWW), typeof(Light), typeof(Mathf), typeof(System.Collections.Generic.List), typeof(Action), typeof(UnityEngine.Debug) }; //C#静态调用Lua的配置(包括事件的原型),仅可以配delegate,interface [CSharpCallLua] public static List CSharpCallLua = new List() { typeof(Action), typeof(Func), typeof(Action), typeof(Action), typeof(UnityEngine.Events.UnityAction), typeof(System.Collections.IEnumerator) }; //黑名单 [BlackList] public static List> BlackList = new List>() { new List(){"System.Xml.XmlNodeList", "ItemOf"}, new List(){"UnityEngine.WWW", "movie"}, new List(){ "UnityEngine.UI.Text","OnRebuildRequested"}, #if UNITY_WEBGL new List(){"UnityEngine.WWW", "threadPriority"}, #endif new List(){"UnityEngine.Texture2D", "alphaIsTransparency"}, new List(){"UnityEngine.Security", "GetChainOfTrustValue"}, new List(){"UnityEngine.CanvasRenderer", "onRequestRebuild"}, new List(){"UnityEngine.Light", "areaSize"}, #if UNITY_2017_1_OR_NEWER new List(){"UnityEngine.Light", "lightmapBakeType"}, new List(){"UnityEngine.WWW", "MovieTexture"}, new List(){"UnityEngine.WWW", "GetMovieTexture"}, #endif new List(){"UnityEngine.AnimatorOverrideController", "PerformOverrideClipListCleanup"}, #if !UNITY_WEBPLAYER new List(){"UnityEngine.Application", "ExternalEval"}, #endif new List(){"UnityEngine.GameObject", "networkView"}, //4.6.2 not support new List(){"UnityEngine.Component", "networkView"}, //4.6.2 not support new List(){"System.IO.FileInfo", "GetAccessControl", "System.Security.AccessControl.AccessControlSections"}, new List(){"System.IO.FileInfo", "SetAccessControl", "System.Security.AccessControl.FileSecurity"}, new List(){"System.IO.DirectoryInfo", "GetAccessControl", "System.Security.AccessControl.AccessControlSections"}, new List(){"System.IO.DirectoryInfo", "SetAccessControl", "System.Security.AccessControl.DirectorySecurity"}, new List(){"System.IO.DirectoryInfo", "CreateSubdirectory", "System.String", "System.Security.AccessControl.DirectorySecurity"}, new List(){"System.IO.DirectoryInfo", "Create", "System.Security.AccessControl.DirectorySecurity"}, new List(){"UnityEngine.MonoBehaviour", "runInEditMode"}, #if !UNITY_5_6_OR_NEWER #endif }; }