[CHANGE] fileName and order of CreateAssetMenu for better usability

This commit is contained in:
Slawa Deisling 2018-11-26 00:53:46 +01:00
parent c6ead5c623
commit 181426f3e1
48 changed files with 186 additions and 101 deletions

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Bool")]
public class BoolConstant : ScriptableObjectVariableBase<bool> { }
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Bool", fileName = "BoolConstant", order = 2)]
public class BoolConstant : ScriptableObjectVariableBase<bool>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Color")]
public class ColorConstant : ScriptableObjectVariableBase<Color> { }
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Color", fileName = "ColorConstant", order = 4)]
public class ColorConstant : ScriptableObjectVariableBase<Color>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Float")]
public class FloatConstant : ScriptableObjectVariableBase<float> { }
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Float", fileName = "FloatConstant", order = 1)]
public class FloatConstant : ScriptableObjectVariableBase<float>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Int")]
public class IntConstant : ScriptableObjectVariableBase<int> { }
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Int", fileName = "IntConstant", order = 0)]
public class IntConstant : ScriptableObjectVariableBase<int>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Constants/String")]
public class StringConstant : ScriptableObjectVariableBase<string> { }
[CreateAssetMenu(menuName = "Unity Atoms/Constants/String", fileName = "StringConstant", order = 3)]
public class StringConstant : ScriptableObjectVariableBase<string>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Vector2")]
public class Vector2Constant : ScriptableObjectVariableBase<Vector2> { }
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Vector2", fileName = "Vector2Constant", order = 5)]
public class Vector2Constant : ScriptableObjectVariableBase<Vector2>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Vector3")]
public class Vector3Constant : ScriptableObjectVariableBase<Vector3> { }
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Vector3", fileName = "Vector3Constant", order = 6)]
public class Vector3Constant : ScriptableObjectVariableBase<Vector3>
{
}
}

View File

@ -2,6 +2,9 @@
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Bool")]
public class SetBoolVariableValue : SetVariableValue<bool, BoolVariable, BoolReference, BoolEvent, BoolBoolEvent> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Bool",
fileName = "SetBoolVariableValueAction", order = 2)]
public class SetBoolVariableValue : SetVariableValue<bool, BoolVariable, BoolReference, BoolEvent, BoolBoolEvent>
{
}
}

View File

@ -2,6 +2,9 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Color")]
public class SetColorVariableValue : SetVariableValue<Color, ColorVariable, ColorReference, ColorEvent, ColorColorEvent> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Color",
fileName = "SetColorVariableValueAction", order = 3)]
public class SetColorVariableValue : SetVariableValue<Color, ColorVariable, ColorReference, ColorEvent, ColorColorEvent>
{
}
}

View File

@ -2,6 +2,9 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Float")]
public class SetFloatVariableValue : SetVariableValue<float, FloatVariable, FloatReference, FloatEvent, FloatFloatEvent> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Float",
fileName = "SetFloatVariableValueAction", order = 1)]
public class SetFloatVariableValue : SetVariableValue<float, FloatVariable, FloatReference, FloatEvent, FloatFloatEvent>
{
}
}

View File

@ -2,6 +2,10 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/GameObject")]
public class SetGameObjectVariableValue : SetVariableValue<GameObject, GameObjectVariable, GameObjectReference, GameObjectEvent, GameObjectGameObjectEvent> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/GameObject",
fileName = "SetGameObjectVariableValueAction", order = 6)]
public class SetGameObjectVariableValue : SetVariableValue<GameObject, GameObjectVariable, GameObjectReference,
GameObjectEvent, GameObjectGameObjectEvent>
{
}
}

View File

@ -2,6 +2,9 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Int")]
public class SetIntVariableValue : SetVariableValue<int, IntVariable, IntReference, IntEvent, IntIntEvent> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Int",
fileName = "SetIntVariableValueAction", order = 0)]
public class SetIntVariableValue : SetVariableValue<int, IntVariable, IntReference, IntEvent, IntIntEvent>
{
}
}

View File

@ -2,6 +2,7 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Vector2")]
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Vector2",
fileName = "SetVector2VariableValueAction", order = 4)]
public class SetVector2VariableValue : SetVariableValue<Vector2, Vector2Variable, Vector2Reference, Vector2Event, Vector2Vector2Event> { }
}

View File

@ -2,6 +2,10 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Vector3")]
public class SetVector3VariableValue : SetVariableValue<Vector3, Vector3Variable, Vector3Reference, Vector3Event, Vector3Vector3Event> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Vector3",
fileName = "SetVector3VariableValueAction", order = 5)]
public class SetVector3VariableValue : SetVariableValue<Vector3, Vector3Variable, Vector3Reference, Vector3Event,
Vector3Vector3Event>
{
}
}

View File

@ -2,7 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Bool Bool")]
public class BoolBoolEvent : GameEvent<bool, bool> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Bool Bool", fileName = "BoolBoolEvent", order = 5)]
public class BoolBoolEvent : GameEvent<bool, bool>
{
}
}

View File

@ -2,7 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Bool")]
public class BoolEvent : GameEvent<bool> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Bool", fileName = "BoolEvent", order = 4)]
public class BoolEvent : GameEvent<bool>
{
}
}

View File

@ -2,6 +2,8 @@
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Collider2D")]
public class Collider2DEvent : GameEvent<Collider2D> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Collider2D", fileName = "Collider2DEvent", order = 12)]
public class Collider2DEvent : GameEvent<Collider2D>
{
}
}

View File

@ -2,7 +2,9 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Collider2D GameObject")]
public class Collider2DGameObjectEvent : GameEvent<Collider2D, GameObject> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Collider2D GameObject", fileName = "Collider2DGameObjectEvent",
order = 13)]
public class Collider2DGameObjectEvent : GameEvent<Collider2D, GameObject>
{
}
}

View File

@ -2,7 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Color Color")]
public class ColorColorEvent : GameEvent<Color, Color> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Color Color", fileName = "ColorColorEvent", order = 7)]
public class ColorColorEvent : GameEvent<Color, Color>
{
}
}

View File

@ -2,7 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Color")]
public class ColorEvent : GameEvent<Color> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Color", fileName = "ColorEvent", order = 6)]
public class ColorEvent : GameEvent<Color>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Float")]
public class FloatEvent : GameEvent<float> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Float", fileName = "FloatEvent", order = 2)]
public class FloatEvent : GameEvent<float>
{
}
}

View File

@ -2,7 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Float Float")]
public class FloatFloatEvent : GameEvent<float, float> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Float Float", fileName = "FloatFloatEvent", order = 3)]
public class FloatFloatEvent : GameEvent<float, float>
{
}
}

View File

@ -2,7 +2,9 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/GameObject Collider2D")]
public class GameObjectCollider2DEvent : GameEvent<GameObject, Collider2D> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/GameObject Collider2D", fileName = "GameObjectCollider2DEvent",
order = 15)]
public class GameObjectCollider2DEvent : GameEvent<GameObject, Collider2D>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/GameObject")]
public class GameObjectEvent : GameEvent<GameObject> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/GameObject", fileName = "GameObjectEvent", order = 14)]
public class GameObjectEvent : GameEvent<GameObject>
{
}
}

View File

@ -2,7 +2,9 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/GameObject GameObject")]
public class GameObjectGameObjectEvent : GameEvent<GameObject, GameObject> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/GameObject GameObject", fileName = "GameObjectGameObjectEvent",
order = 16)]
public class GameObjectGameObjectEvent : GameEvent<GameObject, GameObject>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Int")]
public class IntEvent : GameEvent<int> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Int", fileName = "IntEvent", order = 0)]
public class IntEvent : GameEvent<int>
{
}
}

View File

@ -2,7 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Int Int")]
public class IntIntEvent : GameEvent<int, int> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Int Int", fileName = "IntIntEvent", order = 1)]
public class IntIntEvent : GameEvent<int, int>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Vector2")]
public class Vector2Event : GameEvent<Vector2> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Vector2", fileName = "Vector2Event", order = 8)]
public class Vector2Event : GameEvent<Vector2>
{
}
}

View File

@ -2,7 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Vector2 Vector2")]
public class Vector2Vector2Event : GameEvent<Vector2, Vector2> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Vector2 Vector2", fileName = "Vector2Vector2Event", order = 9)]
public class Vector2Vector2Event : GameEvent<Vector2, Vector2>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Vector3")]
public class Vector3Event : GameEvent<Vector3> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Vector3", fileName = "Vector3Event", order = 10)]
public class Vector3Event : GameEvent<Vector3>
{
}
}

View File

@ -2,7 +2,9 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Vector3 Vector3")]
public class Vector3Vector3Event : GameEvent<Vector3, Vector3> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Vector3 Vector3", fileName = "Vector3Vector3Event",
order = 11)]
public class Vector3Vector3Event : GameEvent<Vector3, Vector3>
{
}
}

View File

@ -2,7 +2,7 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Void")]
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Void", fileName = "VoidEvent", order = 100)]
public class VoidEvent : GameEvent<Void>
{
public void Raise()

View File

@ -2,6 +2,9 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Void GameObject")]
public class VoidGameObjectEvent : GameEvent<Void, GameObject> { }
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Void GameObject", fileName = "VoidGameObjectEvent",
order = 101)]
public class VoidGameObjectEvent : GameEvent<Void, GameObject>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Bool")]
public class BoolList : ScriptableObjectList<bool, BoolEvent> { }
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Bool", fileName = "BoolList", order = 2)]
public class BoolList : ScriptableObjectList<bool, BoolEvent>
{
}
}

View File

@ -2,6 +2,8 @@
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Collider2D")]
public class Collider2DList : ScriptableObjectList<Collider2D, Collider2DEvent> { }
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Collider2D", fileName = "Collider2DList", order = 6)]
public class Collider2DList : ScriptableObjectList<Collider2D, Collider2DEvent>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Color")]
public class ColorList : ScriptableObjectList<Color, ColorEvent> { }
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Color", fileName = "ColorList", order = 3)]
public class ColorList : ScriptableObjectList<Color, ColorEvent>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Float")]
public class FloatList : ScriptableObjectList<float, FloatEvent> { }
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Float", fileName = "FloatList", order = 1)]
public class FloatList : ScriptableObjectList<float, FloatEvent>
{
}
}

View File

@ -3,6 +3,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Lists/GameObject")]
public class GameObjectList : ScriptableObjectList<GameObject, GameObjectEvent> { }
[CreateAssetMenu(menuName = "Unity Atoms/Lists/GameObject", fileName = "GameObjectList", order = 7)]
public class GameObjectList : ScriptableObjectList<GameObject, GameObjectEvent>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Int")]
public class IntList : ScriptableObjectList<int, IntEvent> { }
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Int", fileName = "IntList", order = 0)]
public class IntList : ScriptableObjectList<int, IntEvent>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Vector2")]
public class Vector2List : ScriptableObjectList<Vector2, Vector2Event> { }
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Vector2", fileName = "Vector2List", order = 4)]
public class Vector2List : ScriptableObjectList<Vector2, Vector2Event>
{
}
}

View File

@ -2,6 +2,8 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Vector3")]
public class Vector3List : ScriptableObjectList<Vector3, Vector3Event> { }
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Vector3", fileName = "Vector3List", order = 5)]
public class Vector3List : ScriptableObjectList<Vector3, Vector3Event>
{
}
}

View File

@ -2,6 +2,8 @@
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Bool")]
public class BoolVariable : EquatableScriptableObjectVariable<bool, BoolEvent, BoolBoolEvent> { }
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Bool", fileName = "BoolVariable", order = 2)]
public class BoolVariable : EquatableScriptableObjectVariable<bool, BoolEvent, BoolBoolEvent>
{
}
}

View File

@ -2,7 +2,7 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Color")]
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Color", fileName = "ColorVariable", order = 3)]
public class ColorVariable : ScriptableObjectVariable<Color, ColorEvent, ColorColorEvent>
{
protected override bool AreEqual(Color first, Color second)

View File

@ -2,8 +2,9 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Float")]
public class FloatVariable : EquatableScriptableObjectVariable<float, FloatEvent, FloatFloatEvent>, IWithApplyChange<float, FloatEvent, FloatFloatEvent>
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Float", fileName = "FloatVariable", order = 1)]
public class FloatVariable : EquatableScriptableObjectVariable<float, FloatEvent, FloatFloatEvent>,
IWithApplyChange<float, FloatEvent, FloatFloatEvent>
{
public bool ApplyChange(float amount)
{

View File

@ -2,7 +2,7 @@ using UnityEngine;
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Variables/GameObject")]
[CreateAssetMenu(menuName = "Unity Atoms/Variables/GameObject", fileName = "GameObjectVariable", order = 6)]
public class GameObjectVariable : ScriptableObjectVariable<GameObject, GameObjectEvent, GameObjectGameObjectEvent>
{
protected override bool AreEqual(GameObject first, GameObject second)

View File

@ -2,8 +2,9 @@
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Int")]
public class IntVariable : EquatableScriptableObjectVariable<int, IntEvent, IntIntEvent>, IWithApplyChange<int, IntEvent, IntIntEvent>
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Int", fileName = "IntVariable", order = 0)]
public class IntVariable : EquatableScriptableObjectVariable<int, IntEvent, IntIntEvent>,
IWithApplyChange<int, IntEvent, IntIntEvent>
{
public bool ApplyChange(int amount)
{

View File

@ -2,7 +2,7 @@
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Vector2")]
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Vector2", fileName = "Vector2Variable", order = 4)]
public class Vector2Variable : ScriptableObjectVariable<Vector2, Vector2Event, Vector2Vector2Event>
{
protected override bool AreEqual(Vector2 first, Vector2 second)

View File

@ -2,7 +2,7 @@
namespace UnityAtoms
{
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Vector3")]
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Vector3", fileName = "Vector3Variable", order = 5)]
public class Vector3Variable : ScriptableObjectVariable<Vector3, Vector3Event, Vector3Vector3Event>
{
protected override bool AreEqual(Vector3 first, Vector3 second)