配置的详细介绍请看Doc下《XLua的配置.doc》
| 15 | |
| 16 | //配置的详细介绍请看Doc下《XLua的配置.doc》 |
| 17 | public static class ExampleGenConfig |
| 18 | { |
| 19 | //lua中要使用到C#库的配置,比如C#标准库,或者Unity API,第三方库等。 |
| 20 | [LuaCallCSharp] |
| 21 | public static List<Type> LuaCallCSharp = new List<Type>() { |
| 22 | typeof(System.Object), |
| 23 | typeof(UnityEngine.Object), |
| 24 | typeof(Vector2), |
| 25 | typeof(Vector3), |
| 26 | typeof(Vector4), |
| 27 | typeof(Quaternion), |
| 28 | typeof(Color), |
| 29 | typeof(Ray), |
| 30 | typeof(Bounds), |
| 31 | typeof(Ray2D), |
| 32 | typeof(Time), |
| 33 | typeof(GameObject), |
| 34 | typeof(Component), |
| 35 | typeof(Behaviour), |
| 36 | typeof(Transform), |
| 37 | typeof(Resources), |
| 38 | typeof(TextAsset), |
| 39 | typeof(Keyframe), |
| 40 | typeof(AnimationCurve), |
| 41 | typeof(AnimationClip), |
| 42 | typeof(MonoBehaviour), |
| 43 | typeof(ParticleSystem), |
| 44 | typeof(SkinnedMeshRenderer), |
| 45 | typeof(Renderer), |
| 46 | typeof(WWW), |
| 47 | typeof(Light), |
| 48 | typeof(Mathf), |
| 49 | typeof(System.Collections.Generic.List<int>), |
| 50 | typeof(Action<string>), |
| 51 | typeof(UnityEngine.Debug) |
| 52 | }; |
| 53 | |
| 54 | //C#静态调用Lua的配置(包括事件的原型),仅可以配delegate,interface |
| 55 | [CSharpCallLua] |
| 56 | public static List<Type> CSharpCallLua = new List<Type>() { |
| 57 | typeof(Action), |
| 58 | typeof(Func<double, double, double>), |
| 59 | typeof(Action<string>), |
| 60 | typeof(Action<double>), |
| 61 | typeof(UnityEngine.Events.UnityAction), |
| 62 | typeof(System.Collections.IEnumerator) |
| 63 | }; |
| 64 | |
| 65 | //黑名单 |
| 66 | [BlackList] |
| 67 | public static List<List<string>> BlackList = new List<List<string>>() { |
| 68 | new List<string>(){"System.Xml.XmlNodeList", "ItemOf"}, |
| 69 | new List<string>(){"UnityEngine.WWW", "movie"}, |
| 70 | #if UNITY_WEBGL |
| 71 | new List<string>(){"UnityEngine.WWW", "threadPriority"}, |
| 72 | #endif |
| 73 | new List<string>(){"UnityEngine.Texture2D", "alphaIsTransparency"}, |
| 74 | new List<string>(){"UnityEngine.Security", "GetChainOfTrustValue"}, |
nothing calls this directly
no outgoing calls
no test coverage detected