add new pack: Editor Attributes, complete GoTo cmd

This commit is contained in:
MinhHai
2026-01-09 15:01:29 +07:00
parent b9bf09f31a
commit 219c87f469
462 changed files with 18860 additions and 2 deletions
@@ -0,0 +1,14 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DecorativeAttributes/assetpreview.html")]
public class AssetPreviewSample : MonoBehaviour
{
[Header("AssetPreview attribute:")]
[SerializeField, AssetPreview] private Sprite spriteAsset;
[SerializeField, AssetPreview(64f, 64f)] private Material materialAsset;
[SerializeField, AssetPreview(32f, 32f)] private Mesh meshAsset;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 6cd925956710d72478dcce1cff6fd595
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 269285
packageName: EditorAttributes
packageVersion: 2.9.2
assetPath: Assets/EditorAttributes/Samples/Scripts/DecorativeAttributeSamples/AssetPreviewSample.cs
uploadId: 806636
@@ -0,0 +1,18 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DecorativeAttributes/colorfield.html")]
public class ColorFieldSample : MonoBehaviour
{
// This attribute has been deprecated, use GUIColor instead. See ColorFieldDrawer.cs for more details
//[Header("ColorField Attribute:")]
//[SerializeField, ColorField(GUIColor.Orange)] private int intField;
//[SerializeField] private double doubleField;
//[SerializeField, ColorField(3f, 252f, 177f)] private string stringField;
//[SerializeField, ColorField("#8c508b")] private bool boolField;
//[SerializeField] private Vector3 vectorField;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: d8ee5f8da0f5d5c4281487cb804b7bec
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 269285
packageName: EditorAttributes
packageVersion: 2.9.2
assetPath: Assets/EditorAttributes/Samples/Scripts/DecorativeAttributeSamples/ColorFieldSample.cs
uploadId: 806636
@@ -0,0 +1,25 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DecorativeAttributes/guicolor.html")]
public class GUIColorSample : MonoBehaviour
{
[Header("GUIColor Attribute:")]
[GUIColor(GUIColor.Yellow)]
[SerializeField] private int intField01;
[SerializeField] private string stringField01;
[SerializeField] private bool boolField01;
[Space]
[GUIColor(3f, 252f, 177f)]
[SerializeField] private int intField02;
[SerializeField] private string stringField02;
[SerializeField] private bool boolField02;
[Space]
[GUIColor("#fc0398")]
[SerializeField] private int intField03;
[SerializeField] private string stringField03;
[SerializeField] private bool boolField03;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: b0714f518b28f194bb749626e09c7470
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 269285
packageName: EditorAttributes
packageVersion: 2.9.2
assetPath: Assets/EditorAttributes/Samples/Scripts/DecorativeAttributeSamples/GUIColorSample.cs
uploadId: 806636
@@ -0,0 +1,25 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DecorativeAttributes/helpbox.html")]
public class HelpBoxSample : MonoBehaviour
{
[Header("HelpBox Attribute:")]
[HelpBox("This is a help box", MessageMode.None)]
[SerializeField] private int helpBox;
[HelpBox("This is a <i>log</i> box", MessageMode.Log)]
[SerializeField] private int logBox;
[HelpBox("This is a <b>warning</b> box", MessageMode.Warning)]
[SerializeField] private int warningBox;
[HelpBox("This is an <color=#FF0000>error</color> box", MessageMode.Error)]
[SerializeField] private int errorBox;
[HelpBox(nameof(dynamicHelpbox), MessageMode.Log, StringInputMode.Dynamic)]
[SerializeField] private string dynamicHelpbox;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 88f60f24038b5ae4ca696bdd3a7184ec
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 269285
packageName: EditorAttributes
packageVersion: 2.9.2
assetPath: Assets/EditorAttributes/Samples/Scripts/DecorativeAttributeSamples/HelpBoxSample.cs
uploadId: 806636
@@ -0,0 +1,12 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DecorativeAttributes/hidelabel.html")]
public class HideLabelSample : MonoBehaviour
{
[Header("HideLabel Attribute:")]
[SerializeField, HideLabel] private string stringField;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 2f658ac5a85403341b6098caf28c2516
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 269285
packageName: EditorAttributes
packageVersion: 2.9.2
assetPath: Assets/EditorAttributes/Samples/Scripts/DecorativeAttributeSamples/HideLabelSample.cs
uploadId: 806636
@@ -0,0 +1,18 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DecorativeAttributes/image.html")]
public class ImageSample : MonoBehaviour
{
[Header("Image Attribute:")]
[SerializeField, FilePath(filters: "png")] private string imagePath;
[Image(nameof(imagePath), stringInputMode: StringInputMode.Dynamic)]
[SerializeField] private int field01;
[Image(nameof(imagePath), 50f, 50f, StringInputMode.Dynamic)]
[SerializeField] private int field02;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 28179efcbb299c8498eb5a32bbe2c4eb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 269285
packageName: EditorAttributes
packageVersion: 2.9.2
assetPath: Assets/EditorAttributes/Samples/Scripts/DecorativeAttributeSamples/ImageSample.cs
uploadId: 806636
@@ -0,0 +1,14 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DecorativeAttributes/indentproperty.html")]
public class IndentPropertySample : MonoBehaviour
{
[Header("IndentProperty Attribute:")]
[SerializeField, IndentProperty] private int intField;
[SerializeField, IndentProperty(30f)] private float floatField;
[SerializeField, IndentProperty(40f)] private string stringField;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: bdeade1ad0f9a19479dfff31cc37fec7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 269285
packageName: EditorAttributes
packageVersion: 2.9.2
assetPath: Assets/EditorAttributes/Samples/Scripts/DecorativeAttributeSamples/IndentPropertySample.cs
uploadId: 806636
@@ -0,0 +1,20 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DecorativeAttributes/line.html")]
public class LineSample : MonoBehaviour
{
[Header("Line Attribute:")]
[SerializeField] private int field01;
[Line]
[SerializeField] private int field02;
[Line(GUIColor.Red)]
[SerializeField] private int field03;
[Line(GUIColor.Yellow, 0.1f)]
[SerializeField] private int field04;
[Line("#327ba8", lineThickness: 10f)]
[SerializeField] private int field05;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 3e39eed001cbe7e4ebb6727d8c0eb471
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 269285
packageName: EditorAttributes
packageVersion: 2.9.2
assetPath: Assets/EditorAttributes/Samples/Scripts/DecorativeAttributeSamples/LineSample.cs
uploadId: 806636
@@ -0,0 +1,14 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DecorativeAttributes/prefix.html")]
public class PrefixSample : MonoBehaviour
{
[Header("Prefix Attribute:")]
[SerializeField, Prefix("num")] private int intField;
[SerializeField, Prefix("float num", 20f)] private float floatField;
[SerializeField, Prefix(nameof(dynamicPrefix), stringInputMode: StringInputMode.Dynamic)] private string dynamicPrefix;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: b284fd97b96d3bb43b04120f76b09f88
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 269285
packageName: EditorAttributes
packageVersion: 2.9.2
assetPath: Assets/EditorAttributes/Samples/Scripts/DecorativeAttributeSamples/PrefixSample.cs
uploadId: 806636
@@ -0,0 +1,16 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DecorativeAttributes/propertyorder.html")]
public class PropertyOrderSample : MonoBehaviour
{
[Header("PropertyOrder Attribute:")]
[SerializeField] private int intField;
[SerializeField, PropertyOrder(3)] private int intField01;
[SerializeField, PropertyOrder(2)] private int intField02;
[SerializeField, PropertyOrder(1)] private int intField03;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 6ca4833209499d2479495159be03a2a3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 269285
packageName: EditorAttributes
packageVersion: 2.9.2
assetPath: Assets/EditorAttributes/Samples/Scripts/DecorativeAttributeSamples/PropertyOrderSample.cs
uploadId: 806636
@@ -0,0 +1,14 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DecorativeAttributes/propertywidth.html")]
public class PropertyWidthSample : MonoBehaviour
{
[Header("PropertyWidth Attribute:")]
[SerializeField, PropertyWidth(-100f)] private int intField;
[SerializeField, PropertyWidth(100f)] private float floatField;
[SerializeField, PropertyWidth(200f)] private string stringField;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: d7ca088a779c1e642935213dd31d3d78
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 269285
packageName: EditorAttributes
packageVersion: 2.9.2
assetPath: Assets/EditorAttributes/Samples/Scripts/DecorativeAttributeSamples/PropertyWidthSample.cs
uploadId: 806636
@@ -0,0 +1,21 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/MiscellaneousAttributes/rename.html")]
public class RenameSample : MonoBehaviour
{
[Header("Rename Attribute:")]
[SerializeField, Rename("IntField")] private int intField01;
[Space]
[SerializeField, Rename("pascal case mode", CaseType.Pascal)] private int intField02;
[SerializeField, Rename("Camel Case Mode", CaseType.Camel)] private int intField03;
[SerializeField, Rename("snake case mode", CaseType.Snake)] private int intField04;
[SerializeField, Rename("kebab case mode", CaseType.Kebab)] private int intField05;
[SerializeField, Rename("upper case mode", CaseType.Upper)] private int intField06;
[SerializeField, Rename("LOWER CASE MODE", CaseType.Lower)] private int intField07;
[Space]
[SerializeField, Rename(nameof(dynamicName), CaseType.Unity, StringInputMode.Dynamic)] private string dynamicName;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 01ca19c992b77944db937c9f188b977d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 269285
packageName: EditorAttributes
packageVersion: 2.9.2
assetPath: Assets/EditorAttributes/Samples/Scripts/DecorativeAttributeSamples/RenameSample.cs
uploadId: 806636
@@ -0,0 +1,14 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DecorativeAttributes/suffix.html")]
public class SuffixSample : MonoBehaviour
{
[Header("Suffix Attribute:")]
[SerializeField, Suffix("meters")] private float intField;
[SerializeField, Suffix("km", 30f)] private float floatField;
[SerializeField, Suffix(nameof(dynamicSuffix), stringInputMode: StringInputMode.Dynamic)] private string dynamicSuffix;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: a7ec4029e6d53ee46b6803daf6beec3a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 269285
packageName: EditorAttributes
packageVersion: 2.9.2
assetPath: Assets/EditorAttributes/Samples/Scripts/DecorativeAttributeSamples/SuffixSample.cs
uploadId: 806636
@@ -0,0 +1,30 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DecorativeAttributes/title.html")]
public class TitleSample : MonoBehaviour
{
[Header("Title Attribute:")]
[Title("This is a title!")]
[SerializeField] private int intField01;
[SerializeField] private string stringField01;
[SerializeField] private float floatField01;
[Title("<b>Big bold title!</b>", 40, lineThickness: 4f, alignment: TextAnchor.MiddleRight)]
[SerializeField] private int intField02;
[SerializeField] private string stringField02;
[SerializeField] private float floatField02;
[Title("<i>This is an italic title with no line!</i>", 30, 20f, false, alignment: TextAnchor.MiddleCenter)]
[SerializeField] private int intField03;
[SerializeField] private string stringField03;
[SerializeField] private float floatField03;
[Title(nameof(DynamicTitle), 20, 10f, true, stringInputMode: StringInputMode.Dynamic)]
[SerializeField] private string stringField04;
private string DynamicTitle() => $"This is a dynamic title: {stringField04}";
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 8ac196d4a8cf9704b8bf34d930c5a48a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 269285
packageName: EditorAttributes
packageVersion: 2.9.2
assetPath: Assets/EditorAttributes/Samples/Scripts/DecorativeAttributeSamples/TitleSample.cs
uploadId: 806636