Unity 注释小技巧
程序员文章站
2022-06-17 09:44:59
...
你只需要在字段上添加特效即可 [Header( " 注释 " )][Space( 20 )] public Vector3 test1; ===================================================================================== 自己抽时间写了一个中文显示小脚本.下次问问老大能不能加到项目中去 usin
你只需要在字段上添加特效即可
[Header("注释")] [Space(20)] public Vector3 test1;
=====================================================================================
自己抽时间写了一个中文显示小脚本.下次问问老大能不能加到项目中去
using UnityEngine; using System.Collections; using UnityEditor; using System; using System.Reflection; using System.Collections.Generic; [CustomEditor(typeof(MyCompoment))] public class MyCompomentEditor : Editor{ public MyCompomentEditor():base() { //Debug.Log("我初始化了"); } private static bool isDevelop = true; public override void OnInspectorGUI() { if (isDevelop) { MyCompoment edit = (MyCompoment)target; Type t = edit.GetType(); string label = string.Empty; FieldInfo[] fieldInfs = t.GetFields(); System.Object[] atrrs = null; for (int i = 0; i ) { atrrs
上一篇: 如何修改一条云助手命令相关参数和命令内容
下一篇: php开发普遍用什么开发工具!