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,16 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/NumericalAttributes/clamp.html")]
public class ClampSample : MonoBehaviour
{
[Header("Clamp Attribute:")]
[SerializeField, Clamp(-10, 10)] private int intField;
[SerializeField, Clamp(-0.5f, 10.5f)] private float floatField;
[Space]
[SerializeField, Clamp(-10f, 10f, -5f, 5f)] private Vector2 vector2Field;
[SerializeField, Clamp(-10f, 10f, -5f, 5f, -1f, 1f)] private Vector3 vector3Field;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 394b56f2fef75f241b8d2084e3fcd51a
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/NumericalAttributeSamples/ClampSample.cs
uploadId: 806636
@@ -0,0 +1,17 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/NumericalAttributes/drawhandle.html")]
public class DrawHandleSample : MonoBehaviour
{
[Header("DrawHandle Attribute:")]
[SerializeField, DrawHandle] private float floatField;
[Space]
[SerializeField, DrawHandle(handleSpace: Space.Self)] private Vector3[] vector3Array;
[SerializeField, DrawHandle] private SimpleTransform transformField;
[Space]
[SerializeField, DrawHandle(GUIColor.Green, Space.Self)] private Bounds boundsField;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: f9198481fd169dd49b80c573e746910a
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/NumericalAttributeSamples/DrawHandleSample.cs
uploadId: 806636
@@ -0,0 +1,16 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/NumericalAttributes/minmaxslider.html")]
public class MinMaxSliderSample : MonoBehaviour
{
[Header("MinMaxSlider Attribute:")]
[SerializeField, MinMaxSlider(-10f, 10f)] private Vector2 vector2Field;
[SerializeField, MinMaxSlider(0, 20f)] private Vector2Int vector2IntField;
[Space]
[SerializeField, MinMaxSlider(0f, 10f, false)] private Vector2 vector2FieldNoField;
[SerializeField, MinMaxSlider(0f, 10f, false)] private Vector2Int vector2IntFieldNoField;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 7b76938a41cb70242b5b75d7aebc2474
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/NumericalAttributeSamples/MinMaxSliderSample.cs
uploadId: 806636
@@ -0,0 +1,21 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/NumericalAttributes/progressbar.html")]
public class ProgressBarSample : MonoBehaviour
{
[Header("ProgressBar Attribute:")]
[SerializeField, Range(0f, 100f)] private float value;
[SerializeField, ProgressBar] private int intBar;
[SerializeField, ProgressBar(100f, 50f)] private float floatBar;
void OnValidate()
{
intBar = (int)value;
floatBar = value;
}
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 8520ad9903a9b9d44a9c1b6cb3a79322
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/NumericalAttributeSamples/ProgressBarSample.cs
uploadId: 806636
@@ -0,0 +1,19 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/NumericalAttributes/unitfield.html")]
public class UnitFieldSample : MonoBehaviour
{
[Header("UnitField Attribute:")]
[Rename(nameof(ConversionResultDays), stringInputMode: StringInputMode.Dynamic)]
[SerializeField, UnitField(Unit.Hour, Unit.Day)] private int intField;
[Rename(nameof(ConversionResultGigabytes), stringInputMode: StringInputMode.Dynamic)]
[SerializeField, UnitField(Unit.Megabyte, Unit.Gigabyte)] private float floatField;
private string ConversionResultDays() => $"{intField} Days";
private string ConversionResultGigabytes() => $"{floatField} Gigabytes";
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: f8055aa61d04ddc40a02ac1a702df2eb
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/NumericalAttributeSamples/UnitFieldSample.cs
uploadId: 806636
@@ -0,0 +1,16 @@
using UnityEngine;
using EditorAttributes;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/NumericalAttributes/wrap.html")]
public class WrapSample : MonoBehaviour
{
[Header("Wrap Attribute:")]
[SerializeField, Wrap(0, 20)] private int intField;
[SerializeField, Wrap(0f, 360f)] private float floatField;
[Space]
[SerializeField, Wrap(0f, 10f, -10f, 0f)] private Vector2 vector2Field;
[SerializeField, Wrap(0f, 10f, -10f, 0f, -20f, 20f)] private Vector3 vector3Field;
}
}
@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 7376561f99811784684d30ddd9d6dc99
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/NumericalAttributeSamples/WrapSample.cs
uploadId: 806636