Archived
分散文件结构,添加了枚举类型的一个辅助类
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
|
||||
using UnityEditor;
|
||||
using XericLibrary.Runtime.CustomDrawer;
|
||||
|
||||
namespace XericLibrary.Editor.CustomDrawer
|
||||
{
|
||||
|
||||
[CustomPropertyDrawer(typeof(ReNameAttribute))]
|
||||
public class ReNameDrawer : PropertyDrawer
|
||||
{
|
||||
private GUIContent lable = null;
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
if(lable == null)
|
||||
{
|
||||
string name = (attribute as ReNameAttribute).Name;
|
||||
lable = new GUIContent(name);
|
||||
}
|
||||
|
||||
EditorGUI.PropertyField(position, property, lable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16413afe09f44374d8cdefbe1fcb6960
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user