Initial commit: Client Doc docs Server Tools
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,638 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using XLua;
|
||||
using System.Reflection;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
public static class LuaGen
|
||||
{
|
||||
[LuaCallCSharp]
|
||||
public static List<Type> LuaCallCSharp = new List<Type>()
|
||||
{
|
||||
typeof(UnityEngine.Video.VideoPlayer.EventHandler),
|
||||
typeof(Action<byte[]>),
|
||||
typeof(DateTime),
|
||||
typeof(Dictionary<int, int>),
|
||||
typeof(Dictionary<string, object>),
|
||||
typeof(Dictionary<string,string>),
|
||||
typeof(Dictionary<string,string>),
|
||||
typeof(Dictionary<long,string>),
|
||||
typeof(Dictionary<string,string>.Enumerator),
|
||||
typeof(IEnumerator),
|
||||
typeof(KeyValuePair<string,string>),
|
||||
typeof(List<int>),
|
||||
typeof(List<string>),
|
||||
typeof(List<UnityEngine.Component>),
|
||||
typeof(LuaEnv),
|
||||
typeof(object),
|
||||
typeof(System.Net.Dns),
|
||||
typeof(System.Net.Sockets.AddressFamily),
|
||||
typeof(System.Net.Sockets.SocketError),
|
||||
typeof(System.Runtime.CompilerServices.ExtensionAttribute),
|
||||
typeof(TimeSpan),
|
||||
typeof(Convert),
|
||||
typeof(UnityEngine.NetworkReachability),
|
||||
typeof(UnityEngine.AI.NavMeshAgent),
|
||||
typeof(UnityEngine.AI.NavMeshObstacle),
|
||||
typeof(UnityEngine.AnimationClip),
|
||||
typeof(UnityEngine.AnimationCurve),
|
||||
typeof(UnityEngine.Animator),
|
||||
typeof(UnityEngine.AnimatorStateInfo),
|
||||
typeof(UnityEngine.Application),
|
||||
typeof(UnityEngine.Behaviour),
|
||||
typeof(UnityEngine.Bounds),
|
||||
typeof(UnityEngine.BoxCollider),
|
||||
typeof(UnityEngine.Camera),
|
||||
typeof(UnityEngine.Camera.MonoOrStereoscopicEye),
|
||||
typeof(UnityEngine.Camera.StereoscopicEye),
|
||||
typeof(UnityEngine.Rendering.Universal.CameraExtensions),
|
||||
typeof(UnityEngine.Rendering.Universal.UniversalAdditionalCameraData),
|
||||
//typeof(Cinemachine.CinemachineBrain),
|
||||
//typeof(Cinemachine.CinemachineVirtualCamera),
|
||||
//typeof(Cinemachine.LensSettings),
|
||||
typeof(UnityEngine.Canvas),
|
||||
typeof(UnityEngine.CanvasGroup),
|
||||
typeof(UnityEngine.Collider),
|
||||
typeof(UnityEngine.Color),
|
||||
typeof(UnityEngine.ColorUtility),
|
||||
typeof(UnityEngine.Component),
|
||||
typeof(UnityEngine.Debug),
|
||||
typeof(UnityEngine.Events.UnityEvent),
|
||||
typeof(UnityEngine.EventSystems.BaseEventData),
|
||||
typeof(UnityEngine.EventSystems.PhysicsRaycaster),
|
||||
typeof(UnityEngine.EventSystems.PointerEventData),
|
||||
typeof(UnityEngine.EventSystems.PointerEventData.FramePressState),
|
||||
typeof(UnityEngine.EventSystems.PointerEventData.InputButton),
|
||||
typeof(UnityEngine.EventSystems.UIBehaviour),
|
||||
typeof(UnityEngine.GameObject),
|
||||
typeof(UnityEngine.GUIUtility),
|
||||
typeof(UnityEngine.Input),
|
||||
typeof(UnityEngine.Keyframe),
|
||||
typeof(UnityEngine.LayerMask),
|
||||
typeof(UnityEngine.LineRenderer),
|
||||
typeof(UnityEngine.Material),
|
||||
typeof(UnityEngine.Mathf),
|
||||
typeof(UnityEngine.Matrix4x4),
|
||||
typeof(UnityEngine.MonoBehaviour),
|
||||
typeof(UnityEngine.Networking.DownloadHandler),
|
||||
typeof(UnityEngine.Networking.DownloadHandlerBuffer),
|
||||
typeof(UnityEngine.Networking.DownloadHandlerTexture),
|
||||
typeof(UnityEngine.Networking.UnityWebRequest),
|
||||
typeof(UnityEngine.Networking.UnityWebRequestAsyncOperation),
|
||||
typeof(UnityEngine.Object),
|
||||
typeof(UnityEngine.ParticleSystem),
|
||||
typeof(UnityEngine.ParticleSystem.MainModule),
|
||||
typeof(UnityEngine.Playables.PlayableDirector),
|
||||
typeof(UnityEngine.PlayerPrefs),
|
||||
typeof(UnityEngine.Quaternion),
|
||||
typeof(UnityEngine.Random),
|
||||
typeof(UnityEngine.Ray),
|
||||
typeof(UnityEngine.Ray2D),
|
||||
typeof(UnityEngine.RaycastHit),
|
||||
typeof(UnityEngine.Rect),
|
||||
typeof(UnityEngine.RectTransform),
|
||||
typeof(UnityEngine.RectTransform.Axis),
|
||||
typeof(UnityEngine.RectTransform.Edge),
|
||||
typeof(UnityEngine.RectTransformUtility),
|
||||
typeof(UnityEngine.Renderer),
|
||||
typeof(UnityEngine.RenderTexture),
|
||||
typeof(UnityEngine.Resources),
|
||||
typeof(UnityEngine.Rigidbody),
|
||||
typeof(UnityEngine.RuntimeAnimatorController),
|
||||
typeof(UnityEngine.RuntimePlatform),
|
||||
typeof(UnityEngine.Screen),
|
||||
typeof(UnityEngine.SleepTimeout),
|
||||
typeof(UnityEngine.SkinnedMeshRenderer),
|
||||
typeof(UnityEngine.Sprite),
|
||||
typeof(UnityEngine.SystemInfo),
|
||||
typeof(UnityEngine.TextAsset),
|
||||
typeof(UnityEngine.Texture),
|
||||
typeof(UnityEngine.Texture2D),
|
||||
typeof(UnityEngine.ImageConversion),
|
||||
typeof(UnityEngine.Texture2D.EXRFlags),
|
||||
typeof(UnityEngine.Time),
|
||||
typeof(UnityEngine.TouchPhase),
|
||||
typeof(UnityEngine.Transform),
|
||||
typeof(UnityEngine.GameObject),
|
||||
typeof(UnityEngine.UI.Button),
|
||||
typeof(UnityEngine.UI.Button.ButtonClickedEvent),
|
||||
typeof(UnityEngine.UI.Dropdown),
|
||||
typeof(UnityEngine.UI.GridLayoutGroup),
|
||||
typeof(UnityEngine.UI.GridLayoutGroup.Axis),
|
||||
typeof(UnityEngine.UI.GridLayoutGroup.Constraint),
|
||||
typeof(UnityEngine.UI.GridLayoutGroup.Corner),
|
||||
typeof(UnityEngine.UI.HorizontalLayoutGroup),
|
||||
typeof(UnityEngine.UI.Image),
|
||||
typeof(UnityEngine.UI.Image.FillMethod),
|
||||
typeof(UnityEngine.UI.Image.Origin180),
|
||||
typeof(UnityEngine.UI.Image.Origin360),
|
||||
typeof(UnityEngine.UI.Image.Origin360),
|
||||
typeof(UnityEngine.UI.Image.Origin90),
|
||||
typeof(UnityEngine.UI.Image.OriginHorizontal),
|
||||
typeof(UnityEngine.UI.Image.OriginVertical),
|
||||
typeof(UnityEngine.UI.Image.Type),
|
||||
typeof(UnityEngine.UI.InputField),
|
||||
typeof(UnityEngine.UI.InputField.CharacterValidation),
|
||||
typeof(UnityEngine.UI.InputField.ContentType),
|
||||
typeof(UnityEngine.UI.InputField.InputType),
|
||||
typeof(UnityEngine.UI.InputField.LineType),
|
||||
typeof(UnityEngine.UI.InputField.OnChangeEvent),
|
||||
typeof(UnityEngine.UI.InputField.SubmitEvent),
|
||||
typeof(UnityEngine.UI.InputField.OnValidateInput),
|
||||
typeof(UnityEngine.UI.LayoutGroup),
|
||||
typeof(UnityEngine.UI.LayoutRebuilder),
|
||||
typeof(UnityEngine.UI.MaskableGraphic),
|
||||
typeof(UnityEngine.UI.MaskableGraphic.CullStateChangedEvent),
|
||||
typeof(UnityEngine.UI.RawImage),
|
||||
typeof(UnityEngine.UI.Scrollbar),
|
||||
typeof(UnityEngine.UI.Scrollbar.Direction),
|
||||
typeof(UnityEngine.UI.Scrollbar.ScrollEvent),
|
||||
typeof(UnityEngine.UI.ScrollRect),
|
||||
typeof(UnityEngine.UI.ScrollRect.MovementType),
|
||||
typeof(UnityEngine.UI.ScrollRect.ScrollbarVisibility),
|
||||
typeof(UnityEngine.UI.ScrollRect.ScrollRectEvent),
|
||||
typeof(UnityEngine.UI.Selectable),
|
||||
typeof(UnityEngine.UI.Selectable.Transition),
|
||||
typeof(UnityEngine.UI.Slider),
|
||||
typeof(UnityEngine.UI.Slider.Direction),
|
||||
typeof(UnityEngine.UI.Slider.SliderEvent),
|
||||
typeof(UnityEngine.UI.Text),
|
||||
typeof(UnityEngine.UI.Toggle),
|
||||
typeof(UnityEngine.UI.Toggle.ToggleEvent),
|
||||
typeof(UnityEngine.UI.Toggle.ToggleTransition),
|
||||
typeof(UnityEngine.UI.CanvasScaler),
|
||||
typeof(UnityEngine.Vector2),
|
||||
typeof(UnityEngine.Vector2Int),
|
||||
typeof(UnityEngine.Vector3),
|
||||
typeof(UnityEngine.Vector3Int),
|
||||
typeof(List<UnityEngine.Vector3>),
|
||||
typeof(UnityEngine.Vector4),
|
||||
typeof(UnityEngine.WaitForEndOfFrame),
|
||||
typeof(UnityEngine.TextMesh),
|
||||
typeof(UnityEngine.Profiling.Profiler),
|
||||
typeof(XGame.XWebSocket),
|
||||
typeof(XGame.lsocket),
|
||||
typeof(UnityEngine.Timeline.ActivationTrack),
|
||||
typeof(UnityEngine.Timeline.ControlTrack),
|
||||
typeof(UnityEngine.Timeline.ControlPlayableAsset),
|
||||
typeof(UnityEngine.Video.VideoPlayer),
|
||||
typeof(UnityEngine.LayerMask),
|
||||
typeof(Action<bool>),
|
||||
typeof(Func<string, string>),
|
||||
typeof(Action<int>),
|
||||
typeof(Func<UnityEngine.Networking.DownloadHandler>),
|
||||
typeof(TimeZoneInfo),
|
||||
typeof(DayOfWeek),
|
||||
typeof(DG.Tweening.ShortcutExtensions),
|
||||
typeof(DG.Tweening.TweenExtensions),
|
||||
typeof(DG.Tweening.TweenSettingsExtensions),
|
||||
typeof(DG.Tweening.Ease),
|
||||
typeof(DG.Tweening.RotateMode),
|
||||
//typeof(DG.Tweening.Tween),
|
||||
typeof(DG.Tweening.DOTween),
|
||||
typeof(DG.Tweening.DOTweenModuleUI),
|
||||
|
||||
//typeof(XGame.Utility),
|
||||
|
||||
|
||||
|
||||
#if DEVELOPMENT || RELEASE
|
||||
typeof(GYGame.GMToolViewBuilder),
|
||||
typeof(MobileConsole.UI.GenericNodeView),
|
||||
typeof(MobileConsole.UI.CheckboxNodeView),
|
||||
typeof(MobileConsole.UI.DropdownNodeView),
|
||||
typeof(MobileConsole.UI.InputNodeView),
|
||||
typeof(MobileConsole.UI.SliderNodeView),
|
||||
typeof(MobileConsole.UI.CategoryNodeView),
|
||||
#endif
|
||||
};
|
||||
|
||||
[GCOptimize]
|
||||
public static List<Type> GCOptimizeList = new List<Type>()
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
[CSharpCallLua]
|
||||
public static List<Type> CSharpCallLua = new List<Type>()
|
||||
{
|
||||
typeof(IEnumerator),
|
||||
typeof(UnityEngine.Events.UnityAction),
|
||||
typeof(UnityEngine.Events.UnityAction<UnityEngine.Vector2>),
|
||||
typeof(UnityEngine.Events.UnityAction<int>),
|
||||
typeof(UnityEngine.Events.UnityAction<int,UnityEngine.GameObject>),
|
||||
typeof(UnityEngine.Events.UnityAction<int,bool>),
|
||||
typeof(UnityEngine.Events.UnityAction<int,int>),
|
||||
typeof(UnityEngine.LayerMask),
|
||||
typeof(UnityEngine.EventSystems.PhysicsRaycaster),
|
||||
typeof(Action<string[]>),
|
||||
typeof(Action<UnityEngine.Transform>),
|
||||
typeof(Action<bool, string>),
|
||||
typeof(Action<UnityEngine.Object>),
|
||||
typeof(Action<UnityEngine.EventSystems.PointerEventData>),
|
||||
typeof(Action<UnityEngine.GameObject>),
|
||||
typeof(Action<UnityEngine.EventSystems.BaseEventData>),
|
||||
typeof(Action<UnityEngine.Vector3>),
|
||||
typeof(UnityEngine.Events.UnityAction<bool>),
|
||||
typeof(UnityEngine.Events.UnityAction<int>),
|
||||
typeof(UnityEngine.Events.UnityAction<float>),
|
||||
typeof(UnityEngine.UI.InputField.OnValidateInput),
|
||||
typeof(Action<string, int, char>),
|
||||
typeof(Action<string, string, string, Action, Action>),
|
||||
typeof(Action<string, string, string, object, Action>),
|
||||
typeof(Action<System.Net.Sockets.SocketError>),
|
||||
typeof(Action<XGame.XWebSocket, string>),
|
||||
typeof(Action<byte[]>),
|
||||
typeof(Action<float>),
|
||||
typeof(Action<bool>),
|
||||
typeof(Action<float,float,float,bool>),
|
||||
typeof(Action<uint>),
|
||||
typeof(Action<int>),
|
||||
typeof(Action<string, byte[]>),
|
||||
typeof(Func<int, List<string>>),
|
||||
typeof(Func<LuaTable>),
|
||||
typeof(Func<int, int, int, int>),
|
||||
typeof(Func<int, int, int, bool>),
|
||||
typeof(Func<int, int, LuaTable>),
|
||||
typeof(Func<bool, int, LuaTable>),
|
||||
typeof(Func<bool, bool, int, LuaTable>),
|
||||
typeof(Func<int, int, bool>),
|
||||
typeof(Action<int, Action>),
|
||||
typeof(Action<int, Action, Action, int>),
|
||||
typeof(Action<int, int, Action<bool>>),
|
||||
typeof(Func<int, string>),
|
||||
typeof(Func<int, bool>),
|
||||
typeof(Func<bool>),
|
||||
typeof(Action<int, UnityEngine.EventSystems.PointerEventData>),
|
||||
typeof(Func<int, LuaTable>),
|
||||
typeof(Action<int, Action<int>>),
|
||||
typeof(Action<string>),
|
||||
typeof(Action<string,string>),
|
||||
typeof(UnityEngine.EventSystems.PointerEventData),
|
||||
typeof(Func<UnityEngine.GameObject,int,bool>),
|
||||
typeof(Action<long,string>),
|
||||
|
||||
typeof(Action<UnityEngine.RectTransform, int>),
|
||||
typeof(Action<int, UnityEngine.RectTransform>),
|
||||
typeof(DG.Tweening.Core.DOGetter<UnityEngine.Vector2>),
|
||||
typeof(DG.Tweening.Core.DOGetter<UnityEngine.Vector3>),
|
||||
typeof(DG.Tweening.Core.DOGetter<float>),
|
||||
typeof(DG.Tweening.Core.DOGetter<int>),
|
||||
typeof(DG.Tweening.Core.DOSetter<float>),
|
||||
typeof(DG.Tweening.Core.DOSetter<int>),
|
||||
|
||||
#if DEVELOPMENT || RELEASE
|
||||
typeof(MobileConsole.UI.GenericNodeView.Callback),
|
||||
typeof(MobileConsole.UI.CheckboxNodeView.Callback),
|
||||
typeof(MobileConsole.UI.DropdownNodeView.Callback),
|
||||
typeof(MobileConsole.UI.InputNodeView.Callback),
|
||||
typeof(MobileConsole.UI.SliderNodeView.Callback),
|
||||
#endif
|
||||
};
|
||||
|
||||
private static Type[] Elements =
|
||||
{
|
||||
typeof(bool),
|
||||
typeof(int),
|
||||
typeof(float),
|
||||
typeof(double),
|
||||
typeof(string),
|
||||
typeof(object)
|
||||
};
|
||||
|
||||
private static List<Type[]> GetElementsList()
|
||||
{
|
||||
List<Type[]> list1= new List<Type[]>();
|
||||
//List<Type[]> list1 = XGame.Utility.GetPermutation(Elements, 3);
|
||||
//List<Type[]> list2 = XGame.Utility.GetPermutation(Elements, 2);
|
||||
//list1.AddRange(list2);
|
||||
//for (int i = 0; i < Elements.Length; i++)
|
||||
//{
|
||||
// Type e = Elements[i];
|
||||
// list1.Add(new[]
|
||||
// {
|
||||
// e
|
||||
// });
|
||||
// list1.Add(new[]
|
||||
// {
|
||||
// e,
|
||||
// e
|
||||
// });
|
||||
// list1.Add(new[]
|
||||
// {
|
||||
// e,
|
||||
// e,
|
||||
// e
|
||||
// });
|
||||
//}
|
||||
|
||||
//for (int i = 0; i < list2.Count; ++i)
|
||||
//{
|
||||
// Type[] elements = list2[i];
|
||||
// Type e1 = elements[0];
|
||||
// Type e2 = elements[1];
|
||||
// list1.Add(new[]
|
||||
// {
|
||||
// e1,
|
||||
// e1,
|
||||
// e2
|
||||
// });
|
||||
// list1.Add(new[]
|
||||
// {
|
||||
// e1,
|
||||
// e2,
|
||||
// e1
|
||||
// });
|
||||
// list1.Add(new[]
|
||||
// {
|
||||
// e2,
|
||||
// e1,
|
||||
// e1
|
||||
// });
|
||||
//}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
private static List<Type> GetCSharpCallLua()
|
||||
{
|
||||
List<Type[]> list = GetElementsList();
|
||||
List<Type> csharpCallLua = new List<Type>();
|
||||
|
||||
for (int i = 0; i < list.Count; ++i)
|
||||
{
|
||||
Type[] elements = list[i];
|
||||
Type actionGeneric = null;
|
||||
Type funcGeneric = null;
|
||||
|
||||
switch (elements.Length)
|
||||
{
|
||||
case 1:
|
||||
actionGeneric = typeof(Action<>);
|
||||
funcGeneric = typeof(Func<>);
|
||||
break;
|
||||
case 2:
|
||||
actionGeneric = typeof(Action<,>);
|
||||
funcGeneric = typeof(Func<,>);
|
||||
break;
|
||||
case 3:
|
||||
actionGeneric = typeof(Action<,,>);
|
||||
funcGeneric = typeof(Func<,,>);
|
||||
break;
|
||||
}
|
||||
|
||||
if (actionGeneric != null)
|
||||
{
|
||||
csharpCallLua.Add(actionGeneric.MakeGenericType(elements));
|
||||
}
|
||||
|
||||
if (funcGeneric != null)
|
||||
{
|
||||
csharpCallLua.Add(funcGeneric.MakeGenericType(elements));
|
||||
}
|
||||
}
|
||||
|
||||
return csharpCallLua;
|
||||
}
|
||||
|
||||
[CSharpCallLua]
|
||||
public static List<Type> CSharpCallLuaAuto = GetCSharpCallLua();
|
||||
|
||||
[BlackList]
|
||||
public static List<List<string>> BlackList = new List<List<string>>()
|
||||
{
|
||||
new List<string>()
|
||||
{
|
||||
"UnityEngine.Texture2D",
|
||||
"alphaIsTransparency"
|
||||
},
|
||||
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"
|
||||
},
|
||||
new List<string>()
|
||||
{
|
||||
"UnityEngine.Component",
|
||||
"networkView"
|
||||
},
|
||||
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>()
|
||||
{
|
||||
"UnityEngine.MonoBehaviour",
|
||||
"runInEditMode"
|
||||
},
|
||||
new List<string>()
|
||||
{
|
||||
"UnityEngine.Input",
|
||||
"IsJoystickPreconfigured",
|
||||
"System.String"
|
||||
},
|
||||
new List<string>()
|
||||
{
|
||||
"UnityEngine.Texture",
|
||||
"imageContentsHash"
|
||||
},
|
||||
new List<string>()
|
||||
{
|
||||
"UnityEngine.UI.Text",
|
||||
"OnRebuildRequested"
|
||||
},
|
||||
new List<string>()
|
||||
{
|
||||
"XGame.Actor",
|
||||
"RidToActorDict"
|
||||
},
|
||||
new List<string>()
|
||||
{
|
||||
"XGame.Actor",
|
||||
"GetInspectedData",
|
||||
"XGame.PropertyInspectorBehaviour"
|
||||
},
|
||||
new List<string>()
|
||||
{
|
||||
"XGame.Utility",
|
||||
"GetBuildPlatformName",
|
||||
"UnityEditor.BuildTarget"
|
||||
},
|
||||
new List<string>()
|
||||
{
|
||||
"XGame.FileManager",
|
||||
"OnFileChange",
|
||||
"System.Object",
|
||||
"System.IO.FileSystemEventArgs",
|
||||
},
|
||||
new List<string>()
|
||||
{
|
||||
"XGame.FileManager",
|
||||
"OnFileRename",
|
||||
"System.Object",
|
||||
"System.IO.RenamedEventArgs",
|
||||
},
|
||||
new List<string>()
|
||||
{
|
||||
"XGame.FileManager",
|
||||
"OnFileError",
|
||||
"System.Object",
|
||||
"System.IO.ErrorEventArgs",
|
||||
},
|
||||
|
||||
new List<string>(){ "UnityEngine.Material", "IsChildOf", "UnityEngine.Material"},
|
||||
new List<string>(){ "UnityEngine.Material", "RevertAllPropertyOverrides"},
|
||||
new List<string>(){ "UnityEngine.Material", "IsPropertyOverriden", "System.Int32"},
|
||||
new List<string>(){ "UnityEngine.Material", "IsPropertyOverriden", "System.String"},
|
||||
new List<string>(){ "UnityEngine.Material", "IsPropertyLocked", "System.Int32"},
|
||||
new List<string>(){ "UnityEngine.Material", "IsPropertyLocked", "System.String"},
|
||||
new List<string>(){ "UnityEngine.Material", "IsPropertyLockedByAncestor", "System.Int32"},
|
||||
new List<string>(){ "UnityEngine.Material", "IsPropertyLockedByAncestor", "System.String"},
|
||||
new List<string>(){ "UnityEngine.Material", "SetPropertyLock","System.Int32", "System.Boolean"},
|
||||
new List<string>(){ "UnityEngine.Material", "SetPropertyLock", "System.String", "System.Boolean"},
|
||||
new List<string>(){ "UnityEngine.Material", "ApplyPropertyOverride","UnityEngine.Material", "System.String", "System.Boolean"},
|
||||
new List<string>(){ "UnityEngine.Material", "ApplyPropertyOverride","UnityEngine.Material", "System.Int32", "System.Boolean"},
|
||||
new List<string>(){ "UnityEngine.Material", "RevertPropertyOverride", "System.Int32"},
|
||||
new List<string>(){ "UnityEngine.Material", "RevertPropertyOverride", "System.String"},
|
||||
new List<string>(){ "UnityEngine.Material", "parent"},
|
||||
new List<string>(){ "UnityEngine.Material", "isVariant"},
|
||||
|
||||
new List<string>() { "RenderHeads.Media.AVProVideo.MediaPlayer", "EditorUpdate" },
|
||||
new List<string>() { "RenderHeads.Media.AVProVideo.MediaPlayer", "CheckEditorAudioMute" },
|
||||
new List<string>() { "RenderHeads.Media.AVProVideo.MediaPlayer", "EditorAllPlayersDispose" },
|
||||
new List<string>() { "RenderHeads.Media.AVProVideo.MediaPlayer", "GetPlatformOptions", "RenderHeads.Media.AVProVideo.Platform" },
|
||||
new List<string>() { "RenderHeads.Media.AVProVideo.MediaPlayer", "GetPlatformOptionsVariable", "RenderHeads.Media.AVProVideo.Platform" },
|
||||
new List<string>() { "RenderHeads.Media.AVProVideo.MediaPlayer", "SaveFrameToExr" },
|
||||
new List<string>() { "RenderHeads.Media.AVProVideo.MediaPlayer", "SaveFrameToPng" },
|
||||
new List<string>() { "RenderHeads.Media.AVProVideo.MediaPlayer", "InternalMediaLoadedEvent" },
|
||||
new List<string>() { "UnityEngine.MonoBehaviour", "EnableScriptReloadInCheckConsistency", "System.Boolean"},
|
||||
};
|
||||
|
||||
#if UNITY_2018_1_OR_NEWER
|
||||
[BlackList]
|
||||
public static Func<MemberInfo, bool> MethodFilter = (memberInfo) =>
|
||||
{
|
||||
if (memberInfo.DeclaringType.IsGenericType && memberInfo.DeclaringType.GetGenericTypeDefinition() == typeof(Dictionary<,>))
|
||||
{
|
||||
if (memberInfo.MemberType == MemberTypes.Constructor)
|
||||
{
|
||||
ConstructorInfo constructorInfo = memberInfo as ConstructorInfo;
|
||||
ParameterInfo[] parameterInfos = constructorInfo.GetParameters();
|
||||
if (parameterInfos.Length > 0)
|
||||
{
|
||||
if (typeof(IEnumerable).IsAssignableFrom(parameterInfos[0].ParameterType))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (memberInfo.MemberType == MemberTypes.Method)
|
||||
{
|
||||
MethodInfo methodInfo = memberInfo as MethodInfo;
|
||||
if (methodInfo.Name == "TryAdd" || methodInfo.Name == "Remove" && methodInfo.GetParameters().Length == 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (memberInfo.DeclaringType.IsGenericType && memberInfo.DeclaringType.GetGenericTypeDefinition() == typeof(KeyValuePair<,>))
|
||||
{
|
||||
if (memberInfo.MemberType == MemberTypes.Method)
|
||||
{
|
||||
MethodInfo methodInfo = memberInfo as MethodInfo;
|
||||
if (methodInfo.Name == "Deconstruct")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (memberInfo.MemberType == MemberTypes.Method)
|
||||
{
|
||||
MethodInfo methodInfo = memberInfo as MethodInfo;
|
||||
ParameterInfo[] parameterInfos = methodInfo.GetParameters();
|
||||
foreach (ParameterInfo param in parameterInfos)
|
||||
{
|
||||
if (typeof(ReadOnlySpan<char>).IsAssignableFrom(param.ParameterType)
|
||||
|| typeof(ReadOnlySpan<byte>).IsAssignableFrom(param.ParameterType)
|
||||
|| typeof(ReadOnlySpan<int>).IsAssignableFrom(param.ParameterType)
|
||||
|| typeof(ReadOnlySpan<Vector3>).IsAssignableFrom(param.ParameterType)
|
||||
|| typeof(Span<char>).IsAssignableFrom(param.ParameterType)
|
||||
|| typeof(Span<byte>).IsAssignableFrom(param.ParameterType)
|
||||
|| typeof(Span<bool>).IsAssignableFrom(param.ParameterType)
|
||||
|| typeof(Span<Vector3>).IsAssignableFrom(param.ParameterType)
|
||||
)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user