_MainTex ("Albedo (RGB)", 2D) = "white" {} [Enum(UnityEngine.Rendering.CullMode)] _Cull ("Cull Mode", Float) = 1 [Enum(Off,0,On,1)] _ZWrite ("ZWrite", Float) = 1 [Enum(Less,0, Greater,1, LEqual,2, GEqual,3, Equal,4, NotEqual,5, Always,6)] _ZTest ("ZTest", Fl...
PropertyRange 更强大一点,还可以限制属性范围;正常Unity内置的功能是显示不了字段的,这里我们用了Odin里的【ShowInInspector】特性,来把Property 属性显示出来 示例: [Range(0, 10)] public int Field = 2;[ShowInInspector,PropertyRange(0, 10)] public int Property { get; set; } 效果图: 进阶用法: 我...
Show Non-Public members and Static members as categories in watch and local views. Improved display of Unity's SerializedProperty to only evaluate the value field valid for the property. DebuggerDisplayAttribute support for classes and structs. DebuggerTypeProxyAttribute support. Make the insertion of ...
public static CompatibilityAssetBundleManifest BuildAssetBundles(string outputPath, BuildAssetBundleOptions assetBundleOptions, BuildTarget targetPlatform) { // Retrieve the AssetBundle definitions as defined through the Inspector and saved in the AssetDatabase var buildInput = ContentBuildInterface....
Fix link to documentation for enum type members (#2336) Fix links to documentation when local Unity version cannot be detected Fix issue with online documentation URL generation (RIDER-79366) Fix exception editing .asmdef files in non-project folders (DEXP-678810, #2350) Fix not showing usages...
实际使用中非常简单,只需要在枚举字段上方加上[SearchableEnum]属性即可! publicclassSearchableEnumDemo:ScriptableObject{[SearchableEnum]publicKeyCodeAwesomeKeyCode;} 演示: 对比传统的枚举绘制效果,用户体验的好歹与否是不是立见分晓? 转载,侵立删 链接 UnityEditorJunkie - SearchableEnum ...
public enum BulletType { DirectAttack = 0, // 直接攻击 Phony, // 假子弹 Real, // 真子弹 Track, // 追踪子弹 } /// /// 可序列化 /// [Serializable] public class Bullet : ScriptableObject { // Bullet 类直接继承自 ScriptableObject // 子弹类型 public ...
using UnityEditor; using UnityEngine; [CustomEditor(typeof(TestScript))] //指定所要绑定的Mono类型,即TestScript public class TestScriptInspector : Editor { TestScript m_target; private void OnEnable() { m_target = target as TestScript; //绑定target: The object being inspected } pu...
to query parameter “NAME” for it’s minimum, maximum and default values to avoid duplicate definitions of these in the native and UI code. Note that if your OnGUI function return true, the Inspector will show the default UI sliders below the custom GUI. This is again useful to bootstrap...
publicboolupdateDynamically =true; // Additional controller settings for showing scrollwheel, etc. 目前里面只有一个参数,就就是是否显示滚轮 publicRenderModel_ControllerMode_State_tcontrollerModeState; // Name of the sub-object which represents the "local"coordinate space for each component. ...