您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

20 行
702 B

using UnityEditor;
using UnityEngine;
namespace MetaCity.BundleKit.Editor
{
[CustomEditor(typeof(Portal.Portal))]
public class PortalEditor:UnityEditor.Editor
{
public sealed override void OnInspectorGUI()
{
EditorGUILayout.HelpBox("Sign Spawn Point and Name for this Portal, GUID will be auto generate",MessageType.Info);
DrawDefaultInspector();
var guidProperty=serializedObject.FindProperty("portalGUID");
EditorGUILayout.BeginHorizontal();
GUI.enabled=false;
guidProperty.intValue=EditorGUILayout.IntField("GUID",guidProperty.intValue,new GUIStyle(GUI.skin.label));
GUI.enabled=true;
EditorGUILayout.EndHorizontal();
}
}
}