//配置的详细介绍请看Doc下《XLua的配置.doc》 using System; using UnityEngine; using XLua; using Coolape; using System.Collections; using System.IO; using System.Collections.Generic; public static class XluaGenCodeConfig { //lua中要使用到C#库的配置,比如C#标准库,或者Unity API,第三方库等。 [LuaCallCSharp] public static System.Collections.Generic.List LuaCallCSharp = new System.Collections.Generic.List() { typeof(System.Object), typeof(UnityEngine.Object), typeof(Vector2), typeof(Vector3), typeof(Vector4), typeof(Rect), typeof(Quaternion), typeof(Color), typeof(Ray), typeof(Ray2D), typeof(Bounds), 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(System.Collections.Generic.List), typeof(Action), typeof(UnityEngine.Debug), typeof(Hashtable), typeof(ArrayList), typeof(Queue), typeof(Stack), typeof(GC), typeof(File), typeof(Directory), typeof(Application), typeof(SystemInfo), typeof(RaycastHit), typeof(System.IO.Path), typeof(System.IO.MemoryStream), typeof(Screen), typeof(PlayerPrefs), typeof(Shader), //NGUI typeof(UIRoot), typeof(UICamera), typeof(Localization), typeof(NGUITools), typeof(UIRect), typeof(UIWidget), typeof(UIWidgetContainer), typeof(UILabel), typeof(UIToggle), typeof(UIBasicSprite), typeof(UITexture), typeof(UISprite), typeof(UIProgressBar), typeof(UISlider), typeof(UIGrid), typeof(UITable), typeof(UIInput), typeof(UIScrollView), typeof(UITweener), typeof(TweenWidth), typeof(TweenRotation), typeof(TweenPosition), typeof(TweenScale), typeof(TweenAlpha), typeof(UICenterOnChild), typeof(UIAtlas), typeof(UILocalize), typeof(UIPlayTween), typeof(UIRect.AnchorPoint), typeof(UIButton), typeof(UIPopupList), //Coolape typeof(CLAssetsManager), typeof(CLAssetsPoolBase), typeof(B2InputStream), typeof(B2OutputStream), typeof(CLBulletBase), typeof(CLBulletPool), typeof(CLEffect), typeof(CLEffectPool), typeof(CLMaterialPool), typeof(CLRolePool), typeof(CLSoundPool), typeof(CLSharedAssets), typeof(CLSharedAssets.CLMaterialInfor), typeof(CLTexturePool), typeof(CLThingsPool), typeof(CLBaseLua), typeof(CLBehaviour4Lua), typeof(CLUtlLua), typeof(CLMainBase), typeof(Net), typeof(Net.NetWorkType), typeof(CLCfgBase), typeof(CLPathCfg), typeof(CLVerManager), typeof(CLAssetType), typeof(CLRoleAction), typeof(CLRoleAvata), typeof(CLUnit), typeof(ColorEx), typeof(BlockWordsTrie), typeof(DateEx), typeof(FileEx), typeof(HttpEx), typeof(JSON), typeof(ListEx), typeof(MapEx), typeof(MyMainCamera), typeof(MyTween), typeof(NewList), typeof(NewMap), typeof(SoundEx), typeof(NumEx), typeof(ObjPool), typeof(PStr), typeof(SScreenShakes), typeof(StrEx), typeof(Utl), typeof(WWWEx), typeof(ZipEx), typeof(XXTEA), typeof(CLButtonMsgLua), typeof(CLJoystick), typeof(CLUIDrag4World), typeof(CLUILoopGrid), typeof(CLUILoopTable), // typeof(CLUILoopGrid2), typeof(CLUIPlaySound), typeof(TweenSpriteFill), typeof(UIDragPage4Lua), typeof(UIDragPageContents), typeof(UIGridPage), typeof(UIMoveToCell), typeof(UISlicedSprite), typeof(CLAlert), typeof(CLCellBase), typeof(CLCellLua), typeof(CLPanelBase), typeof(CLPanelLua), typeof(CLPanelManager), typeof(CLPanelMask4Panel), typeof(CLPBackplate), typeof(CLUIInit), typeof(CLUIOtherObjPool), typeof(CLUIRenderQueue), typeof(CLUIUtl), typeof(EffectNum), typeof(TweenProgress), typeof(B2Int), typeof(AngleEx), typeof(CLGridPoints), typeof(CLUIFormRoot), typeof(CLUIFormUtl), typeof(CLUIElement), typeof(CLUIElementDate), typeof(CLUIElementPopList), typeof(InvokeEx), //========================== typeof(MyMain), typeof(MyCfg), typeof(NativeGallery), typeof(LBSUtl), typeof(MyWWWTexture), typeof(MyLocation), typeof(MyLocation.CoorType), typeof(AndroidStatusBar), typeof(Uri), typeof(Time), typeof(Dist.SpringWebsocket.Client), typeof(Dist.SpringWebsocket.StompFrame), typeof(Dist.SpringWebsocket.StatusCodeEnum), typeof(Mp3PlayerByUrl), typeof(CLUICheckbox), typeof(CLUIPopListPanel), typeof(CLUIScrollViewWithEvent), typeof(Client4Stomp), typeof(MyGallery), typeof(NativeCamera), typeof(MyCamera), }; //C#静态调用Lua的配置(包括事件的原型),仅可以配delegate,interface [CSharpCallLua] public static System.Collections.Generic.List CSharpCallLua = new System.Collections.Generic.List() { typeof(Action), typeof(Func), typeof(Action), typeof(Action), typeof(UnityEngine.Events.UnityAction), typeof(Coolape.Callback), }; //黑名单 [BlackList] public static List> BlackList = new List>() { new List(){ "UnityEngine.WWW", "movie" }, new List(){ "UnityEngine.Texture2D", "alphaIsTransparency" }, new List(){ "UnityEngine.Security", "GetChainOfTrustValue" }, new List(){ "UnityEngine.CanvasRenderer", "onRequestRebuild" }, new List(){ "UnityEngine.Light", "areaSize" }, 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() { "System.IO.Directory", "CreateDirectory", "System.String", "System.Security.AccessControl.DirectorySecurity" }, new List() { "System.IO.Directory", "SetAccessControl", "System.String", "System.Security.AccessControl.DirectorySecurity" }, new List() { "System.IO.Directory", "GetAccessControl", "System.String" }, new List() { "System.IO.Directory", "GetAccessControl", "System.String", "System.Security.AccessControl.AccessControlSections" }, new List() { "System.IO.File", "Create", "System.String", "System.Int32", "System.IO.FileOptions" }, new List() { "System.IO.File", "Create", "System.String", "System.Int32", "System.IO.FileOptions", "System.Security.AccessControl.FileSecurity" }, new List() { "System.IO.File", "GetAccessControl", "System.String", }, new List() { "System.IO.File", "GetAccessControl", "System.String", "System.Security.AccessControl.AccessControlSections", }, new List() { "System.IO.File", "SetAccessControl", "System.String", "System.Security.AccessControl.FileSecurity", }, new List() { "Coolape.CLUnit", "OnDrawGizmos", }, #if UNITY_ANDROID || UNITY_IOS new List() { "UIInput", "ProcessEvent", "UnityEngine.Event", }, #endif new List() { "UIWidget", "showHandlesWithMoveTool", }, new List() { "UIWidget", "showHandles", }, new List() { "Coolape.PStr", "a", "System.Byte", }, new List() { "Coolape.PStr", "a", "System.Byte[]", }, new List() { "UnityEngine.MonoBehaviour", "runInEditMode", }, new List() { "Coolape.CLAssetsManager", "debugKey", }, new List() { "MyCfg", "default_UID", }, }; }