分散文件结构,添加了枚举类型的一个辅助类

This commit is contained in:
2023-09-20 11:04:11 +08:00
parent 8fec9bbc3a
commit a024cf600b
84 changed files with 3267 additions and 221 deletions
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 861e0bb053777664c8fd1ff8f6a125d7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+33
View File
@@ -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
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 96cbfb583c534f946950be81e68280f0
guid: 16413afe09f44374d8cdefbe1fcb6960
MonoImporter:
externalObjects: {}
serializedVersion: 2
-30
View File
@@ -1,30 +0,0 @@
// -----------------------------------------------------------------------------
//
// Use this editor example C# file to develop editor (non-runtime) code.
//
// -----------------------------------------------------------------------------
namespace Lrss3.XericLibrary.Editor
{
/// <summary>
/// Provide a general description of the public class.
/// </summary>
/// <remarks>
/// Packages require XmlDoc documentation for ALL Package APIs.
/// https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/xml-documentation-comments
/// </remarks>
public class MyPublicEditorExampleClass
{
/// <summary>
/// Provide a description of what this private method does.
/// </summary>
/// <param name="parameter1"> Description of parameter 1 </param>
/// <param name="parameter2"> Description of parameter 2 </param>
/// <param name="parameter3"> Description of parameter 3 </param>
/// <returns> Description of what the function returns </returns>
public int CountThingsAndDoStuff(int parameter1, int parameter2, bool parameter3)
{
return parameter3 ? (parameter1 + parameter2) : (parameter1 - parameter2);
}
}
}