自定义Loader在xLua加自定义loader是很简单的,只涉及到一个接口:public delegate byte[] CustomLoader(ref string filepath); public void LuaEnv.AddLoader(CustomLoader loader)通过AddLoader可以注册个回调,该回调参数是字符串,lua代码里头调用require时,参数将会透传给回调,回调中就可以根据这个参数去加载指定文件,如...
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...
GetButtonDeep(this Transform root, string childName, UnityEngine.Events.UnityAction action) { Button result = root.GetButtonDeep(childName); result.onClick.AddListener( action ); return result; } /// /// 深度查找子对象transform引用 /// /// 父对象 /// 具体查找的子对象名称 /// <returns...
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...
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...
}enumState { NoImagesAdded, AddImagesRequested, AddingImages, Done, Error } State m_State;stringm_ErrorMessage =""; StringBuilder m_StringBuilder=newStringBuilder();privatevoidStart() {//var pathName = Application.persistentDataPath + "/3.jpg";//Debug.Log(pathName);//var bytes = ReadFile(pat...
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 = ...
reader.ReadValueSafe(outstringval); url=newUrl(val); }; When you create an extension method inNetworkVariable<T>you need to implement the following values: WriteValue ReadValue DuplicateValue DuplicateValuereturns a complete deep copy of the value thatNetworkVariable<T>compares to a previous value...
usingSystem.IO;usingUnityEditor;// Added new usingusingUnityEditor.Build.Pipeline;publicstaticclassBuildAssetBundlesExample{publicstaticboolBuildAssetBundles(stringoutputPath,boolforceRebuild,booluseChunkBasedCompression,BuildTargetbuildTarget){varoptions=BuildAssetBundleOptions.None;if(useChunkBasedCompression)option...
You can also connect the hierarchy to the inspector so that whenever an object reference in the inspector is highlighted, the selection in hierarchy is updated. To do this, assign the hierarchy to theConnected Hierarchyproperty of the inspector. ...