自定义Loader在xLua加自定义loader是很简单的,只涉及到一个接口:public delegate byte[] CustomLoader(ref string filepath); public void LuaEnv.AddLoader(CustomLoader loader)通过AddLoader可以注册个回调,该回调参数是字符串,lua代码里头调用require时,参数
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; [HelpURL("http://baidu.com")] public class Follow : MonoBehaviour { public test_enum TestEnum; public enum test_enum { test0 = 0, [InspectorName("测试1")] test1 = 1, [Insp...
UniEnumExtension Blazingly Fast Enum Library. 日本語 Features Enum's ToString() is known as a virtual method and slow one. [Flags]Enum's ToString() actually allocates StringBuilder instance and is very slow. Many C# programmers reimplement Enum.ToString() such as Enums.NET. It's a not bad...
print(testobj:GetSomeBaseData()) --访问基类的Extension methods testobj:GenericMethodOfString() --通过Extension methods实现访问泛化方法 --枚举类型 local e = testobj:EnumTestFunc(CS.Tutorial.TestEnum.E1) print(CS.Tutorial.TestEnum.__CastFrom(1), CS.Tutorial.TestEnum.__CastFrom('E1')) --D...
UniTask is run on a custom PlayerLoop. UniTask's playerloop based methods (such as Delay, DelayFrame, asyncOperation.ToUniTask, etc...) accept this PlayerLoopTiming.public enum PlayerLoopTiming { Initialization = 0, LastInitialization = 1, EarlyUpdate = 2, LastEarlyUpdate = 3, FixedUpdate = ...
UNT0001: Unity messages are called by the runtime even if they're empty, don't declare them to avoid unnecessary processing by the Unity runtime. UNT0002: Tag comparison using string equality is slower than the built-in CompareTag method. UNT0003: Usage of the generic form of GetComponent...
{stringclassModule = ConfigurationManager.AppSettings["iPhoneType"]; Assembly assemly= Assembly.Load(classModule.Split(',')[1]); Type type= assemly.GetType(classModule.Split(',')[0]);return(IPhone)Activator.CreateInstance(type);//无参数构造函数}publicstaticIPhone CreatePhone(IBaseBll iBLL) ...
ToDictionary(x => x.Command.internalName, x => x.Command); forwardObjectDependencies = new Dictionary<string, HashSet<ObjectIdentifier>>(); forwardFileDependencies = new Dictionary<string, HashSet<string>>(); reverseAssetDependencies = new Dictionary<string, HashSet<GUID>>(); foreach (var ...
method methodName in time seconds.///参数://methodName:///time:publicvoidInvoke(stringmethodName,floattime);///摘要://Invokes the method methodName in time seconds, then repeatedly every repeatRate//seconds.///参数://methodName:///time:///repeatRate:publicvoidInvokeRepeating(stringmethodName...
public enum ThemeMode { Light = 0, Dark = 1 } public class ThemeModeToBoolConverter : PropertyValueConverter<ThemeMode, bool> { // From source to target. public override bool Convert(ThemeMode value) { return (int) value == 1; } // From target to source. public override ThemeMode ...