add new pack: Editor Attributes, complete GoTo cmd
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "AttributesSamples",
|
||||
"rootNamespace": "EditorAttributeSamples",
|
||||
"references": [
|
||||
"GUID:febaf25a60dafbd44941357b21678606"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 577e0e7bf2e1c394ab9def97f2b3abd5
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 269285
|
||||
packageName: EditorAttributes
|
||||
packageVersion: 2.9.2
|
||||
assetPath: Assets/EditorAttributes/Samples/Scripts/AttributesSamples.asmdef
|
||||
uploadId: 806636
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 715372d3379e1ad4dae973e2e9151c7e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,28 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/ButtonAttributes/buttonfield.html")]
|
||||
public class ButtonFieldSample : MonoBehaviour
|
||||
{
|
||||
[Header("ButtonField Attribute:")]
|
||||
|
||||
[ButtonField(nameof(PrintNumber), buttonHeight: 30f)]
|
||||
[SerializeField] private Void buttonHolder;
|
||||
|
||||
[SerializeField] private int number;
|
||||
|
||||
[HorizontalGroup(true, nameof(buttonHolder01), nameof(buttonHolder02))]
|
||||
[SerializeField] private Void groupHolder;
|
||||
|
||||
[ButtonField(nameof(PrintMessage))]
|
||||
[SerializeField, HideInInspector] private Void buttonHolder01;
|
||||
|
||||
[ButtonField(nameof(PrintMessage), true, 60, 300, "Hold Me")]
|
||||
[SerializeField, HideInInspector] private Void buttonHolder02;
|
||||
|
||||
private void PrintNumber() => print(number);
|
||||
private void PrintMessage() => print("Hello World!");
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e12730e70d968341ab27b24e3a4c647
|
||||
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/ButtonAttributeSamples/ButtonFieldSample.cs
|
||||
uploadId: 806636
|
||||
@@ -0,0 +1,27 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/ButtonAttributes/button.html")]
|
||||
public class ButtonSample : MonoBehaviour
|
||||
{
|
||||
[Header("Button Attribute:")]
|
||||
[SerializeField] private bool toggleButtons;
|
||||
|
||||
[Button("Button")]
|
||||
public void PrintMessage() => print("Hello World!");
|
||||
|
||||
[Button]
|
||||
public void ButtonWithParams(string messageToPrint) => print(messageToPrint);
|
||||
|
||||
[Button(true, 60, 300, "Hold Me", 30f)]
|
||||
public void TallRepetableButton() => print(Random.value);
|
||||
|
||||
[Button(nameof(toggleButtons), ConditionResult.EnableDisable, true)]
|
||||
public void ButtonYouCanDisable() => print("Hello World!");
|
||||
|
||||
[Button(nameof(toggleButtons), ConditionResult.ShowHide, true)]
|
||||
public void ButtonYouCanHide() => print("Hello World!");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d54a8ed3d68d874f8e8a61ac46f3bb0
|
||||
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/ButtonAttributeSamples/ButtonSample.cs
|
||||
uploadId: 806636
|
||||
@@ -0,0 +1,26 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/ButtonAttributes/inlinebutton.html")]
|
||||
public class InlineButtonSample : MonoBehaviour
|
||||
{
|
||||
[Header("InlineButton Attribute:")]
|
||||
[InlineButton(nameof(PrintString))]
|
||||
[SerializeField] private string stringField;
|
||||
|
||||
[InlineButton(nameof(AddValue), true, buttonLabel: "Hold to add +10", buttonWidth: 200f)]
|
||||
[SerializeField] private int intField;
|
||||
|
||||
[InlineButton(nameof(DecreaseFloat), "-", 20f), InlineButton(nameof(IncreaseFloat), "+", 20f)]
|
||||
[SerializeField] private float floatField;
|
||||
|
||||
private void PrintString() => print(stringField);
|
||||
|
||||
private void AddValue() => intField += 10;
|
||||
|
||||
private void IncreaseFloat() => floatField += 0.5f;
|
||||
private void DecreaseFloat() => floatField -= 0.5f;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 54eba7fde35b8ae4e8fa8b3cffae756c
|
||||
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/ButtonAttributeSamples/InlineButtonSample.cs
|
||||
uploadId: 806636
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/ButtonAttributes/selectionbuttons.html")]
|
||||
public class SelectionButtonsSample : MonoBehaviour
|
||||
{
|
||||
public enum States
|
||||
{
|
||||
State01,
|
||||
State02,
|
||||
State03
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum Flags
|
||||
{
|
||||
Flag01 = 0,
|
||||
Flag02 = 1,
|
||||
Flag03 = 2,
|
||||
Flag04 = 4,
|
||||
Flag05 = 8
|
||||
}
|
||||
|
||||
[Header("SelectionButtons Attribute:")]
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
[SerializeField, HelpBox("This attribute has been deprecated use the <b>EnumButtons Attribute</b> instead", MessageMode.Warning)] private EditorAttributes.Void helpBoxHolder;
|
||||
#else
|
||||
[SerializeField, SelectionButtons] private States states;
|
||||
[SerializeField, SelectionButtons(showLabel: false)] private Flags flags;
|
||||
[SerializeField, SelectionButtons(nameof(stringValues), buttonsHeight: 30f)] private string stringField;
|
||||
#endif
|
||||
|
||||
private string[] stringValues = new string[]
|
||||
{
|
||||
"Value01", "Value02", "Value03", "Value04", "Value05", "Value06"
|
||||
};
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d1ce0ec69ae593429f8798d7b1b0c3d
|
||||
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/ButtonAttributeSamples/SelectionButtonsSample.cs
|
||||
uploadId: 806636
|
||||
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/ButtonAttributes/valuebuttons.html")]
|
||||
public class ValueButtonsSample : MonoBehaviour
|
||||
{
|
||||
[Header("ValueButtons Attribute:")]
|
||||
[SerializeField, ValueButtons(nameof(stringValues))] private string stringField;
|
||||
|
||||
private string[] stringValues = new string[]
|
||||
{
|
||||
"Value01", "Value02", "Value03", "Value04", "Value05", "Value06"
|
||||
};
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4c49b76613cda164091de1311890eeba
|
||||
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/ButtonAttributeSamples/ValueButtonsSample.cs
|
||||
uploadId: 806636
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58542efe4307eef46a2c0daa716d5f33
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/ConditionalAttributes/conditionalfield.html")]
|
||||
public class ConditionalFieldSample : MonoBehaviour
|
||||
{
|
||||
[Header("ConditionalField Attribute Hide/Show:")]
|
||||
public bool condition01;
|
||||
public bool condition02;
|
||||
|
||||
[ConditionalField(ConditionType.AND, nameof(condition01), nameof(condition02))]
|
||||
[SerializeField] private int conditionalFieldAND;
|
||||
|
||||
[ConditionalField(ConditionType.OR, nameof(condition01), nameof(condition02))]
|
||||
[SerializeField] private int conditionalFieldOR;
|
||||
|
||||
[ConditionalField(ConditionType.NAND, nameof(condition01), nameof(condition02))]
|
||||
[SerializeField] private int conditionalFieldNAND;
|
||||
|
||||
[ConditionalField(ConditionType.NOR, nameof(condition01), nameof(condition02))]
|
||||
[SerializeField] private int conditionalFieldNOR;
|
||||
|
||||
[ConditionalField(ConditionType.AND, new bool[] { false, true }, nameof(condition01), nameof(condition02))]
|
||||
[SerializeField] private int conditionalFieldANDNegated;
|
||||
|
||||
[Header("ConditionalField Attribute Enable/Disable:")]
|
||||
public bool _condition01;
|
||||
public bool _condition02;
|
||||
|
||||
[ConditionalField(ConditionType.AND, ConditionResult.EnableDisable, nameof(_condition01), nameof(_condition02))]
|
||||
[SerializeField] private int _conditionalFieldAND;
|
||||
|
||||
[ConditionalField(ConditionType.OR, ConditionResult.EnableDisable, nameof(_condition01), nameof(_condition02))]
|
||||
[SerializeField] private int _conditionalFieldOR;
|
||||
|
||||
[ConditionalField(ConditionType.NAND, ConditionResult.EnableDisable, nameof(_condition01), nameof(_condition02))]
|
||||
[SerializeField] private int _conditionalFieldNAND;
|
||||
|
||||
[ConditionalField(ConditionType.NOR, ConditionResult.EnableDisable, nameof(_condition01), nameof(_condition02))]
|
||||
[SerializeField] private int _conditionalFieldNOR;
|
||||
|
||||
[ConditionalField(ConditionType.AND, ConditionResult.EnableDisable, new bool[] { false, true }, nameof(_condition01), nameof(_condition02))]
|
||||
[SerializeField] private int _conditionalFieldANDNegated;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7ac5db79403bc644862c441ce0b0a87
|
||||
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/ConditionalAttributeSamples/ConditionalFieldSample.cs
|
||||
uploadId: 806636
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/ConditionalAttributes/disablefield.html")]
|
||||
public class DisableFieldSample : MonoBehaviour
|
||||
{
|
||||
private enum States
|
||||
{
|
||||
State01 = 0,
|
||||
State02 = 1,
|
||||
State03 = 2
|
||||
}
|
||||
|
||||
[Header("DisableField Attribute Boolean condition:")]
|
||||
[SerializeField] private bool disableCondition;
|
||||
|
||||
[DisableField(nameof(disableCondition))]
|
||||
[SerializeField] private int disabledField;
|
||||
|
||||
[Header("DisableField Attribute Enum condition:")]
|
||||
[SerializeField] private States enumDisableCondition;
|
||||
|
||||
[DisableField(nameof(enumDisableCondition), States.State02)]
|
||||
[SerializeField] private int willDisableOnState02;
|
||||
|
||||
[DisableField(nameof(enumDisableCondition), States.State03)]
|
||||
[SerializeField] private int willDisableOnState03;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca5b7b409c162f04eb911a90038b3c49
|
||||
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/ConditionalAttributeSamples/DisableFieldSample.cs
|
||||
uploadId: 806636
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/ConditionalAttributes/enablefield.html")]
|
||||
public class EnableFieldSample : MonoBehaviour
|
||||
{
|
||||
private enum States
|
||||
{
|
||||
State01 = 0,
|
||||
State02 = 1,
|
||||
State03 = 2
|
||||
}
|
||||
|
||||
[Header("EnableField Attribute Boolean condition:")]
|
||||
[SerializeField] private bool enableCondition;
|
||||
|
||||
[EnableField(nameof(enableCondition))]
|
||||
[SerializeField] private int enabledField;
|
||||
|
||||
[Header("EnableField Attribute Enum condition:")]
|
||||
[SerializeField] private States enumEnableCondition;
|
||||
|
||||
[EnableField(nameof(enumEnableCondition), States.State02)]
|
||||
[SerializeField] private int willEnableOnState02;
|
||||
|
||||
[EnableField(nameof(enumEnableCondition), States.State03)]
|
||||
[SerializeField] private int willEnableOnState03;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 180a077e9497fa442838936d4d18e9db
|
||||
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/ConditionalAttributeSamples/EnableFieldSample.cs
|
||||
uploadId: 806636
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/ConditionalAttributes/hidefield.html")]
|
||||
public class HideFieldSample : MonoBehaviour
|
||||
{
|
||||
private enum States
|
||||
{
|
||||
State01 = 0,
|
||||
State02 = 1,
|
||||
State03 = 2
|
||||
}
|
||||
|
||||
[Header("HideField Attribute Boolean condition:")]
|
||||
[SerializeField] private bool hideCondition;
|
||||
|
||||
[HideField(nameof(hideCondition))]
|
||||
[SerializeField] private int hiddenField;
|
||||
|
||||
[Header("HideField Attribute Enum condition:")]
|
||||
[SerializeField] private States enumHideCondition;
|
||||
|
||||
[HideField(nameof(enumHideCondition), States.State02)]
|
||||
[SerializeField] private int willHideOnState02;
|
||||
|
||||
[HideField(nameof(enumHideCondition), States.State03)]
|
||||
[SerializeField] private int willHideOnState03;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bca698b075f8fd243b41ee0994081bca
|
||||
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/ConditionalAttributeSamples/HideFieldSample.cs
|
||||
uploadId: 806636
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/ConditionalAttributes/messagebox.html")]
|
||||
public class MessageBoxSample : MonoBehaviour
|
||||
{
|
||||
private enum States
|
||||
{
|
||||
State01,
|
||||
State02
|
||||
}
|
||||
|
||||
[Header("MessageBox Attribute Boolean condition:")]
|
||||
[SerializeField] private bool showMessageBoxes;
|
||||
|
||||
[MessageBox("This is a message box", nameof(showMessageBoxes), MessageMode.None)]
|
||||
[SerializeField] private int messageBox;
|
||||
|
||||
[MessageBox("This is a <i>log</i> box", nameof(showMessageBoxes), MessageMode.Log)]
|
||||
[SerializeField] private int logBox;
|
||||
|
||||
[MessageBox("This is a <b>warning</b> box", nameof(showMessageBoxes), MessageMode.Warning)]
|
||||
[SerializeField] private int warningBox;
|
||||
|
||||
[MessageBox("This is an <color=#FF0000>error</color> box", nameof(showMessageBoxes), MessageMode.Error)]
|
||||
[SerializeField] private int errorBox;
|
||||
|
||||
[MessageBox(nameof(dynamicMessageBox), nameof(showMessageBoxes), stringInputMode: StringInputMode.Dynamic)]
|
||||
[SerializeField] private string dynamicMessageBox;
|
||||
|
||||
[Header("MessageBox Attribute Enum condition:")]
|
||||
[SerializeField] private States states;
|
||||
|
||||
[MessageBox("This is a message box", nameof(states), States.State02, MessageMode.None)]
|
||||
[SerializeField] private Void hiddenMessageBox;
|
||||
|
||||
[MessageBox("This is a <i>log</i> box", nameof(states), States.State02, MessageMode.Log)]
|
||||
[SerializeField] private Void hiddenLogBox;
|
||||
|
||||
[MessageBox("This is a <b>warning</b> box", nameof(states), States.State02, MessageMode.Warning)]
|
||||
[SerializeField] private Void hiddenWarningBox;
|
||||
|
||||
[MessageBox("This is an <color=#FF0000>error</color> box", nameof(states), States.State02, MessageMode.Error)]
|
||||
[SerializeField] private Void hiddenErrorBox;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 964b0cbcfa2fb3449a633599e3c7ac2e
|
||||
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/ConditionalAttributeSamples/MessageBoxSample.cs
|
||||
uploadId: 806636
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/ConditionalAttributes/showfield.html")]
|
||||
public class ShowFieldSample : MonoBehaviour
|
||||
{
|
||||
private enum States
|
||||
{
|
||||
State01 = 0,
|
||||
State02 = 1,
|
||||
State03 = 2
|
||||
}
|
||||
|
||||
[Header("ShowField Attribute Boolean condition:")]
|
||||
[SerializeField] private bool showCondition;
|
||||
|
||||
[ShowField(nameof(showCondition))]
|
||||
[SerializeField] private int shownField;
|
||||
|
||||
[Header("ShowField Attribute Enum condition:")]
|
||||
[SerializeField] private States enumShowCondition;
|
||||
|
||||
[ShowField(nameof(enumShowCondition), States.State02)]
|
||||
[SerializeField] private int willShowOnState02;
|
||||
|
||||
[ShowField(nameof(enumShowCondition), States.State03)]
|
||||
[SerializeField] private int willShowOnState03;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29cac6bef41e406458ccab31b422d216
|
||||
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/ConditionalAttributeSamples/ShowFieldSample.cs
|
||||
uploadId: 806636
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c673282c365bcd04db1892ae163e37a6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+14
@@ -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;
|
||||
}
|
||||
}
|
||||
+18
@@ -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
|
||||
+18
@@ -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;
|
||||
}
|
||||
}
|
||||
+18
@@ -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;
|
||||
}
|
||||
}
|
||||
+18
@@ -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;
|
||||
}
|
||||
}
|
||||
+18
@@ -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;
|
||||
}
|
||||
}
|
||||
+18
@@ -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;
|
||||
}
|
||||
}
|
||||
+18
@@ -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
|
||||
+14
@@ -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;
|
||||
}
|
||||
}
|
||||
+18
@@ -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;
|
||||
}
|
||||
}
|
||||
+18
@@ -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
|
||||
+16
@@ -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;
|
||||
}
|
||||
}
|
||||
+18
@@ -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
|
||||
+14
@@ -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;
|
||||
}
|
||||
}
|
||||
+18
@@ -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;
|
||||
}
|
||||
}
|
||||
+18
@@ -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;
|
||||
}
|
||||
}
|
||||
+18
@@ -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}";
|
||||
}
|
||||
}
|
||||
+18
@@ -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
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8b77373799ec0b48b164187def42114
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DropdownAttributes/animatorparamdropdown.html")]
|
||||
public class AnimatorParamDropdownSample : MonoBehaviour
|
||||
{
|
||||
[Header("AnimatorParamDropdown Attribute:")]
|
||||
[SerializeField] private Animator animator;
|
||||
[SerializeField, AnimatorParamDropdown(nameof(animator))] private string stringField;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9226f54f3eb045c4e9bb99a3feb269be
|
||||
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/DropdownAttributeSamples/AnimatorParamDropdownSample.cs
|
||||
uploadId: 806636
|
||||
@@ -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 };
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: afa3127c0cd905f4792de9e01af5e6f7
|
||||
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/DropdownAttributeSamples/DropdownSample.cs
|
||||
uploadId: 806636
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DropdownAttributes/propertydropdown.html")]
|
||||
public class PropertyDropdownSample : MonoBehaviour
|
||||
{
|
||||
[Header("PropertyDropdown Attribute:")]
|
||||
[SerializeField, PropertyDropdown] private BoxCollider boxCollider;
|
||||
[SerializeField, PropertyDropdown] private ExampleScriptableObject scriptableObject;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6f26f3e32aa45a1478dc37c8a688fd3e
|
||||
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/DropdownAttributeSamples/PropertyDropdownSample.cs
|
||||
uploadId: 806636
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DropdownAttributes/scenedropdown.html")]
|
||||
public class SceneDropdownSample : MonoBehaviour
|
||||
{
|
||||
[Header("SceneDropdown Attribute:")]
|
||||
[SerializeField, SceneDropdown] private int intField;
|
||||
[SerializeField, SceneDropdown] private string stringField;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a15edd49ceea0da43b839a2d2641a913
|
||||
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/DropdownAttributeSamples/SceneDropdownSample.cs
|
||||
uploadId: 806636
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DropdownAttributes/sortinglayerdropdown.html")]
|
||||
public class SortingLayerDropdownSample : MonoBehaviour
|
||||
{
|
||||
[Header("SortingLayerDropdown Attribute:")]
|
||||
[SerializeField, SortingLayerDropdown] private int sortingLayer;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1fe545003d59ee149be31354cccd137d
|
||||
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/DropdownAttributeSamples/SortingLayerDropdownSample.cs
|
||||
uploadId: 806636
|
||||
@@ -0,0 +1,12 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DropdownAttributes/tagdropdown.html")]
|
||||
public class TagDropdownSample : MonoBehaviour
|
||||
{
|
||||
[Header("TagDropdown Attribute:")]
|
||||
[SerializeField, TagDropdown] private string field;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69dcbf49052b37240b799150906f53ea
|
||||
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/DropdownAttributeSamples/TagDropdownSample.cs
|
||||
uploadId: 806636
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/DropdownAttributes/typedropdown.html")]
|
||||
public class TypeDropdownSample : MonoBehaviour
|
||||
{
|
||||
[Header("TypeDropdown Attribute:")]
|
||||
[SerializeField, TypeDropdown] private string allVisibleTypes;
|
||||
[SerializeField, TypeDropdown("UnityEngine.CoreModule")] private string filteredTypes;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f4eac2d6526e7c459a776e0b96d73cd
|
||||
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/DropdownAttributeSamples/TypeDropdownSample.cs
|
||||
uploadId: 806636
|
||||
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
using Void = EditorAttributes.Void;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[CreateAssetMenu(fileName = "ExampleScriptableObject", menuName = "ScriptableObjects/ExampleScriptableObject")]
|
||||
public class ExampleScriptableObject : ScriptableObject
|
||||
{
|
||||
public enum Season { Winter, Spring, Summer, Fall }
|
||||
|
||||
[Serializable]
|
||||
public class PlayerClass
|
||||
{
|
||||
public string className;
|
||||
[Range(0f, 100f)] public float playerHealth;
|
||||
public GameObject playerPrefab;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class EnemyData
|
||||
{
|
||||
public string enemyName;
|
||||
[Range(0, 100)] public int enemyHealth;
|
||||
public float enemyDamage;
|
||||
public GameObject enemyPrefab;
|
||||
}
|
||||
|
||||
[Title("General Settings")]
|
||||
public string gameName;
|
||||
public bool isMultiplayer;
|
||||
[ShowField(nameof(isMultiplayer)), Clamp(0, 5), IndentProperty(20f)]
|
||||
public int maxPlayers;
|
||||
[Space]
|
||||
[Title("Entity Settings", titleSpace: 20f)]
|
||||
[SerializeField] private Void titleHolder;
|
||||
|
||||
[HelpBox("Will apply randomly to each player in the list", MessageMode.None)]
|
||||
[MinMaxSlider(0, 100)] public Vector2Int startingCurrency;
|
||||
|
||||
[DataTable] public PlayerClass[] playerClasses;
|
||||
[Space]
|
||||
[DataTable(true)] public EnemyData[] enemies;
|
||||
|
||||
[Title("Level Settings")]
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
[EnumButtons]
|
||||
#else
|
||||
[SelectionButtons]
|
||||
#endif
|
||||
public Season season;
|
||||
[Suffix(nameof(GetTimeOfDay), stringInputMode: StringInputMode.Dynamic), UnitField(Unit.Hour, Unit.Minute)]
|
||||
public float timeOfDay;
|
||||
[Space]
|
||||
[Dropdown(nameof(GetAudioClips))] public string backgroundMusic;
|
||||
[AssetPreview] public Sprite levelBackground;
|
||||
|
||||
private string[] GetAudioClips() => new string[] { "Music/BackgroundMusic1", "Music/BackgroundMusic2", "SFX/Explosion" };
|
||||
private string GetTimeOfDay() => $"{timeOfDay} minutes";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bff6eaa62d1d60e4abac2a2222c3a8f9
|
||||
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/ExampleScriptableObject.cs
|
||||
uploadId: 806636
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b85def78c7063f4db463059b3a8f484
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/GroupingAttributes/datatable.html")]
|
||||
public class DataTableSample : MonoBehaviour
|
||||
{
|
||||
[Serializable]
|
||||
private struct Data
|
||||
{
|
||||
public int intField;
|
||||
public float floatField;
|
||||
public string stringField;
|
||||
public bool boolField;
|
||||
}
|
||||
|
||||
[Header("DataTable Attribute:")]
|
||||
[SerializeField, DataTable(true)] private Data structField;
|
||||
[SerializeField, DataTable] private Data[] structArray;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f67af8a1c485704385da5055134d8d9
|
||||
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/GroupingAttributeSamples/DataTableSample.cs
|
||||
uploadId: 806636
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/GroupingAttributes/foldoutgroup.html")]
|
||||
public class FoldoutGroupSample : MonoBehaviour
|
||||
{
|
||||
[Header("FoldoutGroup attribute:")]
|
||||
[FoldoutGroup("FoldoutGroup", nameof(intField01), nameof(stringField01), nameof(boolField01))]
|
||||
[SerializeField] private Void groupHolder;
|
||||
|
||||
[FoldoutGroup("BoxedFoldoutGroup", drawInBox: true, nameof(intField02), nameof(stringField02), nameof(boolField02))]
|
||||
[SerializeField] private Void boxedGroupHolder;
|
||||
|
||||
[SerializeField, HideProperty] private int intField01;
|
||||
[SerializeField, HideProperty] private string stringField01;
|
||||
[SerializeField, HideProperty] private bool boolField01;
|
||||
|
||||
[SerializeField, HideProperty] private int intField02;
|
||||
[SerializeField, HideProperty] private string stringField02;
|
||||
[SerializeField, HideProperty] private bool boolField02;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: edd00b3f5f18c5b48a1fa65da8c7f7c2
|
||||
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/GroupingAttributeSamples/FoldoutGroupSample.cs
|
||||
uploadId: 806636
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/GroupingAttributes/horizontalgroup.html")]
|
||||
public class HorizontalGroupSample : MonoBehaviour
|
||||
{
|
||||
[Header("HorizontalGroup Attribute:")]
|
||||
[HorizontalGroup(false, nameof(intField01), nameof(stringField01), nameof(boolField01))]
|
||||
[SerializeField] private Void groupHolder;
|
||||
[Space]
|
||||
[HorizontalGroup(150f, 30f, true, nameof(intField02), nameof(stringField02), nameof(boolField02))]
|
||||
[SerializeField] private Void boxedGroupHolder;
|
||||
|
||||
[SerializeField, HideProperty] private int intField01;
|
||||
[SerializeField, HideProperty] private string stringField01;
|
||||
[SerializeField, HideProperty] private bool boolField01;
|
||||
|
||||
[SerializeField, HideProperty] private int intField02;
|
||||
[SerializeField, HideProperty] private string stringField02;
|
||||
[SerializeField, HideProperty] private bool boolField02;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: be310c9b15918904aad22cf6726b1e76
|
||||
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/GroupingAttributeSamples/HorizontalGroupSample.cs
|
||||
uploadId: 806636
|
||||
@@ -0,0 +1,32 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/GroupingAttributes/tabgroup.html")]
|
||||
public class TabGroupSample : MonoBehaviour
|
||||
{
|
||||
[Header("TabGroup Attribute:")]
|
||||
[TabGroup(nameof(intGroup), nameof(stringGroup), nameof(boolGroup))]
|
||||
[SerializeField] private Void tabGroup;
|
||||
|
||||
[VerticalGroup(nameof(intField01), nameof(intField02))]
|
||||
[SerializeField, HideProperty] private Void intGroup;
|
||||
|
||||
[VerticalGroup(nameof(stringField01), nameof(stringField02), nameof(stringField03))]
|
||||
[SerializeField, HideProperty] private Void stringGroup;
|
||||
|
||||
[VerticalGroup(true, nameof(boolField01), nameof(boolField02))]
|
||||
[SerializeField, HideProperty] private Void boolGroup;
|
||||
|
||||
[SerializeField, HideProperty] private int intField01;
|
||||
[SerializeField, HideProperty] private int intField02;
|
||||
|
||||
[SerializeField, HideProperty] private string stringField01;
|
||||
[SerializeField, HideProperty] private string stringField02;
|
||||
[SerializeField, HideProperty] private string stringField03;
|
||||
|
||||
[SerializeField, HideProperty] private bool boolField01;
|
||||
[SerializeField, HideProperty] private bool boolField02;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1af886006f3b7fe4d936852c31ef30d5
|
||||
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/GroupingAttributeSamples/TabGroupSample.cs
|
||||
uploadId: 806636
|
||||
@@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/GroupingAttributes/togglegroup.html")]
|
||||
public class ToggleGroupSample : MonoBehaviour
|
||||
{
|
||||
[Header("ToggleGroup attribute:")]
|
||||
[ToggleGroup("ToggleGroup", nameof(intField01), nameof(stringField01), nameof(boolField01))]
|
||||
[SerializeField] private Void groupHolder;
|
||||
|
||||
[ToggleGroup("BoxedToggleGroup", drawInBox: true, nameof(intField02), nameof(stringField02), nameof(boolField02))]
|
||||
[SerializeField] private bool boxedGroupHolder;
|
||||
|
||||
[SerializeField, HideProperty] private int intField01;
|
||||
[SerializeField, HideProperty] private string stringField01;
|
||||
[SerializeField, HideProperty] private bool boolField01;
|
||||
|
||||
[MessageBox("The toggle group has been enabled", nameof(boxedGroupHolder))]
|
||||
[SerializeField, HideProperty] private int intField02;
|
||||
[SerializeField, HideProperty] private string stringField02;
|
||||
[SerializeField, HideProperty] private bool boolField02;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8d16364a8c14c84695eff13dde25ea1
|
||||
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/GroupingAttributeSamples/ToggleGroupSample.cs
|
||||
uploadId: 806636
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/GroupingAttributes/verticalgroup.html")]
|
||||
public class VerticalGroupSample : MonoBehaviour
|
||||
{
|
||||
[Header("VerticalGroup Attribute:")]
|
||||
[VerticalGroup(true, nameof(intField01), nameof(stringField01), nameof(boolField01))]
|
||||
[SerializeField] private Void groupHolder;
|
||||
|
||||
[HorizontalGroup(true, nameof(boxedGroupHolder), nameof(boxedGroupHolder2))]
|
||||
[SerializeField] private Void horizontalGroupHolder;
|
||||
|
||||
[VerticalGroup(true, nameof(intField02), nameof(stringField02), nameof(boolField02))]
|
||||
[SerializeField, HideProperty] private Void boxedGroupHolder;
|
||||
|
||||
[VerticalGroup(true, nameof(intField03), nameof(stringField03), nameof(boolField03))]
|
||||
[SerializeField, HideProperty] private Void boxedGroupHolder2;
|
||||
|
||||
[SerializeField, HideProperty] private int intField01;
|
||||
[SerializeField, HideProperty] private string stringField01;
|
||||
[SerializeField, HideProperty] private bool boolField01;
|
||||
|
||||
[SerializeField, HideProperty] private int intField02;
|
||||
[SerializeField, HideProperty] private string stringField02;
|
||||
[SerializeField, HideProperty] private bool boolField02;
|
||||
|
||||
[SerializeField, HideProperty] private int intField03;
|
||||
[SerializeField, HideProperty] private string stringField03;
|
||||
[SerializeField, HideProperty] private bool boolField03;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 407b5ce8cd2701b41ac833e5f7b2fe51
|
||||
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/GroupingAttributeSamples/VerticalGroupSample.cs
|
||||
uploadId: 806636
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ceba5ae378f0de40b7f581925fa6e1a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/MiscellaneousAttributes/collectionrange.html")]
|
||||
public class CollectionRangeSample : MonoBehaviour
|
||||
{
|
||||
[Header("CollectionRange Attribute:")]
|
||||
[SerializeField, CollectionRange(0, 5)] private int[] intArray;
|
||||
|
||||
[SerializeField, CollectionRange(1, 7)] private List<string> stringList;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a127d7dbcc58e6244ab8dea603a2d897
|
||||
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/MiscellaneousAttributeSamples/CollectionRangeSample.cs
|
||||
uploadId: 806636
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/MiscellaneousAttributes/disableineditmode.html")]
|
||||
public class DisableInEditModeSample : MonoBehaviour
|
||||
{
|
||||
[Header("DisableInEditMode Attribute:")]
|
||||
[SerializeField, DisableInEditMode] private int disabledField;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17914b4d252f76341a3f925dc1c68ced
|
||||
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/MiscellaneousAttributeSamples/DisableInEditModeSample.cs
|
||||
uploadId: 806636
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/MiscellaneousAttributes/disableinplaymode.html")]
|
||||
public class DisableInPlayModeSample : MonoBehaviour
|
||||
{
|
||||
[Header("DisableInPlayMode Attribute:")]
|
||||
[SerializeField, DisableInPlayMode] private int disabledField;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 31694aaa38d06c249bfe5744b0be5468
|
||||
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/MiscellaneousAttributeSamples/DisableInPlayModeSample.cs
|
||||
uploadId: 806636
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/MiscellaneousAttributes/filepath.html")]
|
||||
public class FilePathSample : MonoBehaviour
|
||||
{
|
||||
[Header("FilePath Attribute:")]
|
||||
[SerializeField, FilePath] private string filePath;
|
||||
[SerializeField, FilePath(false)] private string absoluteFilePath;
|
||||
[SerializeField, FilePath(filters:"cs,unity")] private string filteredFilePath;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a11f692fed529d043863a84a064a3301
|
||||
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/MiscellaneousAttributeSamples/FilePathSample.cs
|
||||
uploadId: 806636
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/MiscellaneousAttributes/folderpath.html")]
|
||||
public class FolderPathSample : MonoBehaviour
|
||||
{
|
||||
[Header("FolderPath Attribute:")]
|
||||
[SerializeField, FolderPath] private string folderPath;
|
||||
[SerializeField, FolderPath(false)] private string absoluteFolderPath;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b9ffeaa79b3a2dd41b502eed2fae24f4
|
||||
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/MiscellaneousAttributeSamples/FolderPathSample.cs
|
||||
uploadId: 806636
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/MiscellaneousAttributes/hideinchildren.html")]
|
||||
public class HideInChildrenSample : HideInChildrenSampleBase
|
||||
{
|
||||
[Header("HideInChildren Attribute:")]
|
||||
[HelpBox("Nothing to see here, the fields are hidden =)", MessageMode.None)]
|
||||
[SerializeField] private Void helpBox;
|
||||
}
|
||||
|
||||
public class HideInChildrenSampleBase : MonoBehaviour
|
||||
{
|
||||
[SerializeField, HideInChildren] private int intField;
|
||||
[SerializeField, HideInChildren] private float floatField;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a30416283a495141969a9b1f0d06c01
|
||||
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/MiscellaneousAttributeSamples/HideInChildrenSample.cs
|
||||
uploadId: 806636
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
using UnityEngine;
|
||||
using EditorAttributes;
|
||||
|
||||
namespace EditorAttributesSamples
|
||||
{
|
||||
[HelpURL("https://editorattributesdocs.readthedocs.io/en/latest/Attributes/MiscellaneousAttributes/hideineditmode.html")]
|
||||
public class HideInEditModeSample : MonoBehaviour
|
||||
{
|
||||
[Header("HideInEditMode Attribute:")]
|
||||
[SerializeField, HideInEditMode] private int hiddenField;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f42bab8cc645db24e90ecab6571061e5
|
||||
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/MiscellaneousAttributeSamples/HideInEditModeSample.cs
|
||||
uploadId: 806636
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user