2020-07-04 14:41:25 +08:00
|
|
|
|
//配置的详细介绍请看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<Type> LuaCallCSharp = new System.Collections.Generic.List<Type>() {
|
|
|
|
|
|
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<int>),
|
|
|
|
|
|
typeof(Action<string>),
|
|
|
|
|
|
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),
|
2020-08-07 22:40:04 +08:00
|
|
|
|
typeof(Texture),
|
|
|
|
|
|
typeof(Texture2D),
|
2020-07-04 14:41:25 +08:00
|
|
|
|
|
|
|
|
|
|
//NGUI
|
|
|
|
|
|
typeof(UIRoot),
|
2020-08-05 07:08:47 +08:00
|
|
|
|
typeof(UIPanel),
|
2020-07-04 14:41:25 +08:00
|
|
|
|
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<UnityEngine.Object>),
|
|
|
|
|
|
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),
|
2020-07-18 21:12:14 +08:00
|
|
|
|
typeof(InvokeEx),
|
2020-07-04 14:41:25 +08:00
|
|
|
|
//==========================
|
|
|
|
|
|
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),
|
2020-08-10 22:23:49 +08:00
|
|
|
|
typeof(MyAudioPlayerByUrl),
|
2020-07-04 14:41:25 +08:00
|
|
|
|
typeof(CLUICheckbox),
|
|
|
|
|
|
typeof(CLUIPopListPanel),
|
2020-07-05 15:44:30 +08:00
|
|
|
|
typeof(CLUIScrollViewWithEvent),
|
2020-07-09 08:50:24 +08:00
|
|
|
|
typeof(Client4Stomp),
|
2020-07-18 21:12:14 +08:00
|
|
|
|
typeof(MyGallery),
|
|
|
|
|
|
typeof(NativeCamera),
|
|
|
|
|
|
typeof(MyCamera),
|
2020-08-07 22:40:04 +08:00
|
|
|
|
typeof(MyFileOpen),
|
|
|
|
|
|
typeof(TextureFormat),
|
2020-08-17 11:13:33 +08:00
|
|
|
|
typeof(FileInfo),
|
2020-08-26 19:56:45 +08:00
|
|
|
|
typeof(CallListner),
|
2020-07-04 14:41:25 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//C#静态调用Lua的配置(包括事件的原型),仅可以配delegate,interface
|
|
|
|
|
|
[CSharpCallLua]
|
|
|
|
|
|
public static System.Collections.Generic.List<Type> CSharpCallLua = new System.Collections.Generic.List<Type>() {
|
|
|
|
|
|
typeof(Action),
|
|
|
|
|
|
typeof(Func<double, double, double>),
|
|
|
|
|
|
typeof(Action<string>),
|
|
|
|
|
|
typeof(Action<double>),
|
|
|
|
|
|
typeof(UnityEngine.Events.UnityAction),
|
|
|
|
|
|
typeof(Coolape.Callback),
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//黑名单
|
|
|
|
|
|
[BlackList]
|
|
|
|
|
|
public static List<List<string>> BlackList = new List<List<string>>() {
|
|
|
|
|
|
new List<string>(){ "UnityEngine.WWW", "movie" },
|
|
|
|
|
|
new List<string>(){ "UnityEngine.Texture2D", "alphaIsTransparency" },
|
2020-08-07 22:40:04 +08:00
|
|
|
|
new List<string>(){ "UnityEngine.Texture", "imageContentsHash" },
|
2020-07-04 14:41:25 +08:00
|
|
|
|
new List<string>(){ "UnityEngine.Security", "GetChainOfTrustValue" },
|
|
|
|
|
|
new List<string>(){ "UnityEngine.CanvasRenderer", "onRequestRebuild" },
|
|
|
|
|
|
new List<string>(){ "UnityEngine.Light", "areaSize" },
|
|
|
|
|
|
new List<string>(){ "UnityEngine.AnimatorOverrideController", "PerformOverrideClipListCleanup" },
|
|
|
|
|
|
#if !UNITY_WEBPLAYER
|
|
|
|
|
|
new List<string>(){ "UnityEngine.Application", "ExternalEval" },
|
|
|
|
|
|
#endif
|
|
|
|
|
|
new List<string>(){ "UnityEngine.GameObject", "networkView" }, //4.6.2 not support
|
|
|
|
|
|
new List<string>(){ "UnityEngine.Component", "networkView" }, //4.6.2 not support
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"System.IO.FileInfo",
|
|
|
|
|
|
"GetAccessControl",
|
|
|
|
|
|
"System.Security.AccessControl.AccessControlSections"
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"System.IO.FileInfo",
|
|
|
|
|
|
"SetAccessControl",
|
|
|
|
|
|
"System.Security.AccessControl.FileSecurity"
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"System.IO.DirectoryInfo",
|
|
|
|
|
|
"GetAccessControl",
|
|
|
|
|
|
"System.Security.AccessControl.AccessControlSections"
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"System.IO.DirectoryInfo",
|
|
|
|
|
|
"SetAccessControl",
|
|
|
|
|
|
"System.Security.AccessControl.DirectorySecurity"
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"System.IO.DirectoryInfo",
|
|
|
|
|
|
"CreateSubdirectory",
|
|
|
|
|
|
"System.String",
|
|
|
|
|
|
"System.Security.AccessControl.DirectorySecurity"
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"System.IO.DirectoryInfo",
|
|
|
|
|
|
"Create",
|
|
|
|
|
|
"System.Security.AccessControl.DirectorySecurity"
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"System.IO.Directory",
|
|
|
|
|
|
"CreateDirectory",
|
|
|
|
|
|
"System.String",
|
|
|
|
|
|
"System.Security.AccessControl.DirectorySecurity"
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"System.IO.Directory",
|
|
|
|
|
|
"SetAccessControl",
|
|
|
|
|
|
"System.String",
|
|
|
|
|
|
"System.Security.AccessControl.DirectorySecurity"
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"System.IO.Directory",
|
|
|
|
|
|
"GetAccessControl",
|
|
|
|
|
|
"System.String"
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"System.IO.Directory",
|
|
|
|
|
|
"GetAccessControl",
|
|
|
|
|
|
"System.String",
|
|
|
|
|
|
"System.Security.AccessControl.AccessControlSections"
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"System.IO.File",
|
|
|
|
|
|
"Create",
|
|
|
|
|
|
"System.String",
|
|
|
|
|
|
"System.Int32",
|
|
|
|
|
|
"System.IO.FileOptions"
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"System.IO.File",
|
|
|
|
|
|
"Create",
|
|
|
|
|
|
"System.String",
|
|
|
|
|
|
"System.Int32",
|
|
|
|
|
|
"System.IO.FileOptions",
|
|
|
|
|
|
"System.Security.AccessControl.FileSecurity"
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"System.IO.File",
|
|
|
|
|
|
"GetAccessControl",
|
|
|
|
|
|
"System.String",
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"System.IO.File",
|
|
|
|
|
|
"GetAccessControl",
|
|
|
|
|
|
"System.String",
|
|
|
|
|
|
"System.Security.AccessControl.AccessControlSections",
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"System.IO.File",
|
|
|
|
|
|
"SetAccessControl",
|
|
|
|
|
|
"System.String",
|
|
|
|
|
|
"System.Security.AccessControl.FileSecurity",
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"Coolape.CLUnit",
|
|
|
|
|
|
"OnDrawGizmos",
|
|
|
|
|
|
},
|
|
|
|
|
|
#if UNITY_ANDROID || UNITY_IOS
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"UIInput",
|
|
|
|
|
|
"ProcessEvent",
|
|
|
|
|
|
"UnityEngine.Event",
|
|
|
|
|
|
},
|
|
|
|
|
|
#endif
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"UIWidget",
|
|
|
|
|
|
"showHandlesWithMoveTool",
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"UIWidget",
|
|
|
|
|
|
"showHandles",
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"Coolape.PStr",
|
|
|
|
|
|
"a",
|
|
|
|
|
|
"System.Byte",
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"Coolape.PStr",
|
|
|
|
|
|
"a",
|
|
|
|
|
|
"System.Byte[]",
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"UnityEngine.MonoBehaviour",
|
|
|
|
|
|
"runInEditMode",
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"Coolape.CLAssetsManager",
|
|
|
|
|
|
"debugKey",
|
|
|
|
|
|
},
|
|
|
|
|
|
new List<string>() {
|
|
|
|
|
|
"MyCfg",
|
|
|
|
|
|
"default_UID",
|
|
|
|
|
|
},
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|