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,36 @@
using UnityEngine;
using EditorAttributes;
using System.Collections.Generic;
namespace EditorAttributesSamples
{
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DropdownAttributes/dropdown.html")]
public class DropdownSample : MonoBehaviour
{
[Header("Dropdown Attribute:")]
[Dropdown(nameof(intValues))]
[SerializeField] private int intDropdown;
[Dropdown(nameof(stringValues))]
[SerializeField] private string stringDropdown;
[Dropdown(nameof(floatValues))]
[SerializeField] private float floatDropdown;
[Dropdown(nameof(vectorValues), new string[] { "Directions/Forward", "Directions/Up", "Directions/Down", "One", "Zero" })]
[SerializeField] private Vector3 vectorDropdown;
private int[] intValues = new int[] { 0, 1, 2 };
private string[] stringValues = new string[] { "Value01", "Value02", "Value03" };
private Dictionary<string, float> floatValues = new()
{
{ "Value: 0.5", 0.5f },
{ "Value: 1.8", 1.8f },
{ "Value: 69.420", 69.420f }
};
private List<Vector3> vectorValues = new() { Vector3.forward, Vector3.up, Vector3.right, Vector3.one, Vector3.zero };
}
}