浏览代码

Big Refactor : Do not rely on UnityEvents Anymore

/main
Thomas ICHÉ 6 年前
当前提交
3e834559
共有 264 个文件被更改,包括 1191 次插入48 次删除
  1. 7
      net.peeweek.gameplay-ingredients/Runtime/Actions/ActionBase.cs
  2. 2
      net.peeweek.gameplay-ingredients/Runtime/Actions/ActionBase.cs.meta
  3. 2
      net.peeweek.gameplay-ingredients/Runtime/Actions/ApplicationExitAction.cs.meta
  4. 4
      net.peeweek.gameplay-ingredients/Runtime/Actions/ToggleGameObjectAction.cs
  5. 2
      net.peeweek.gameplay-ingredients/Runtime/Actions/ToggleGameObjectAction.cs.meta
  6. 2
      net.peeweek.gameplay-ingredients/Runtime/Actions/UnityEventAction.cs
  7. 10
      net.peeweek.gameplay-ingredients/Runtime/GameplayIngredients.asmdef
  8. 7
      net.peeweek.gameplay-ingredients/Runtime/Hooks/OnAwakeHook.cs
  9. 11
      net.peeweek.gameplay-ingredients/Runtime/Hooks/OnEnableDisableHook.cs
  10. 13
      net.peeweek.gameplay-ingredients/Runtime/Hooks/OnKeyDownHook.cs
  11. 7
      net.peeweek.gameplay-ingredients/Runtime/Hooks/OnMessageHook.cs
  12. 8
      net.peeweek.gameplay-ingredients/Runtime/Hooks/OnStartHook.cs
  13. 18
      net.peeweek.gameplay-ingredients/Runtime/Hooks/OnTriggerHook.cs
  14. 12
      net.peeweek.gameplay-ingredients/Runtime/Logic/ConditionalLogic.cs
  15. 13
      net.peeweek.gameplay-ingredients/Runtime/Logic/DelayedLogic.cs
  16. 10
      net.peeweek.gameplay-ingredients/Runtime/Logic/LogicBase.cs
  17. 6
      net.peeweek.gameplay-ingredients/Runtime/Logic/NextFrameLogic.cs
  18. 8
      net.peeweek.gameplay-ingredients/Editor.meta
  19. 8
      net.peeweek.gameplay-ingredients/NaughtyAttributes.meta
  20. 31
      net.peeweek.gameplay-ingredients/Runtime/Callable.cs
  21. 11
      net.peeweek.gameplay-ingredients/Runtime/Callable.cs.meta
  22. 12
      net.peeweek.gameplay-ingredients/Runtime/ICallable.cs
  23. 11
      net.peeweek.gameplay-ingredients/Runtime/ICallable.cs.meta
  24. 33
      net.peeweek.gameplay-ingredients/Runtime/Logic/EditorOnlyLogic.cs
  25. 17
      net.peeweek.gameplay-ingredients/Editor/GameplayIngredients-Editor.asmdef
  26. 7
      net.peeweek.gameplay-ingredients/Editor/GameplayIngredients-Editor.asmdef.meta
  27. 8
      net.peeweek.gameplay-ingredients/Editor/PropertyDrawers.meta
  28. 68
      net.peeweek.gameplay-ingredients/Editor/PropertyDrawers/CallablePropertyDrawer.cs
  29. 11
      net.peeweek.gameplay-ingredients/Editor/PropertyDrawers/CallablePropertyDrawer.cs.meta
  30. 29
      net.peeweek.gameplay-ingredients/Editor/PropertyDrawers/GameObjectTogglePropertyDrawer.cs
  31. 11
      net.peeweek.gameplay-ingredients/Editor/PropertyDrawers/GameObjectTogglePropertyDrawer.cs.meta
  32. 10
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core.meta
  33. 10
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawConditionAttributes.meta
  34. 9
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawConditionAttributes/DrawConditionAttribute.cs
  35. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawConditionAttributes/DrawConditionAttribute.cs.meta
  36. 15
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawConditionAttributes/HideIfAttribute.cs
  37. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawConditionAttributes/HideIfAttribute.cs.meta
  38. 15
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawConditionAttributes/ShowIfAttribute.cs
  39. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawConditionAttributes/ShowIfAttribute.cs.meta
  40. 10
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes.meta
  41. 15
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ButtonAttribute.cs
  42. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ButtonAttribute.cs.meta
  43. 15
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/DisableIfAttribute.cs
  44. 11
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/DisableIfAttribute.cs.meta
  45. 8
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/DrawerAttribute.cs
  46. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/DrawerAttribute.cs.meta
  47. 57
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/DropdownAttribute.cs
  48. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/DropdownAttribute.cs.meta
  49. 15
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/EnableIfAttribute.cs
  50. 11
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/EnableIfAttribute.cs.meta
  51. 17
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/MinMaxSliderAttribute.cs
  52. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/MinMaxSliderAttribute.cs.meta
  53. 32
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ProgressBarAttribute.cs
  54. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ProgressBarAttribute.cs.meta
  55. 9
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ReadOnlyAttribute.cs
  56. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ReadOnlyAttribute.cs.meta
  57. 9
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ReorderableListAttribute.cs
  58. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ReorderableListAttribute.cs.meta
  59. 9
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ResizableTextAreaAttribute.cs
  60. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ResizableTextAreaAttribute.cs.meta
  61. 17
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ShowAssetPreviewAttribute.cs
  62. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ShowAssetPreviewAttribute.cs.meta
  63. 11
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ShowNativePropertyAttribute.cs
  64. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ShowNativePropertyAttribute.cs.meta
  65. 9
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ShowNonSerializedFieldAttribute.cs
  66. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ShowNonSerializedFieldAttribute.cs.meta
  67. 23
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/SliderAttribute.cs
  68. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/SliderAttribute.cs.meta
  69. 10
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/GroupAttributes.meta
  70. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/GroupAttributes/BoxGroupAttribute.cs
  71. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/GroupAttributes/BoxGroupAttribute.cs.meta
  72. 14
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/GroupAttributes/GroupAttribute.cs
  73. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/GroupAttributes/GroupAttribute.cs.meta
  74. 10
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/MetaAttributes.meta
  75. 31
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/MetaAttributes/InfoBoxAttribute.cs
  76. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/MetaAttributes/InfoBoxAttribute.cs.meta
  77. 9
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/MetaAttributes/MetaAttribute.cs
  78. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/MetaAttributes/MetaAttribute.cs.meta
  79. 15
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/MetaAttributes/OnValueChangedAttribute.cs
  80. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/MetaAttributes/OnValueChangedAttribute.cs.meta
  81. 9
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/NaughtyAttribute.cs
  82. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/NaughtyAttribute.cs.meta
  83. 8
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/NaughtyAttributes.asmdef
  84. 7
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/NaughtyAttributes.asmdef.meta
  85. 10
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/ValidatorAttributes.meta
  86. 20
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/ValidatorAttributes/MaxValueAttribute.cs
  87. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/ValidatorAttributes/MaxValueAttribute.cs.meta
  88. 20
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/ValidatorAttributes/MinValueAttribute.cs
  89. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/ValidatorAttributes/MinValueAttribute.cs.meta
  90. 15
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/ValidatorAttributes/RequiredAttribute.cs
  91. 13
      net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/ValidatorAttributes/RequiredAttribute.cs.meta

7
net.peeweek.gameplay-ingredients/Runtime/Actions/ActionBase.cs


namespace GameplayIngredients.Actions
{
public abstract class ActionBase : MonoBehaviour
public abstract class ActionBase : Callable
public abstract void Execute();
public override sealed string ToString()
{
return "Action : " + Name;
}
}
}

2
net.peeweek.gameplay-ingredients/Runtime/Actions/ActionBase.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 3306451490063965843, guid: 0000000000000000d000000000000000, type: 0}
userData:
assetBundleName:
assetBundleVariant:

2
net.peeweek.gameplay-ingredients/Runtime/Actions/ApplicationExitAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: -5487077368411116049, guid: 0000000000000000d000000000000000, type: 0}
userData:
assetBundleName:
assetBundleVariant:

4
net.peeweek.gameplay-ingredients/Runtime/Actions/ToggleGameObjectAction.cs


using NaughtyAttributes;
using UnityEngine;
namespace GameplayIngredients.Actions

[ReorderableList]
public override void Execute()
{
foreach(var target in Targets)

}
}
[System.Serializable]
public struct GameObjectToggle
{
[System.Serializable]

2
net.peeweek.gameplay-ingredients/Runtime/Actions/ToggleGameObjectAction.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 7422848464349959988, guid: 0000000000000000d000000000000000, type: 0}
userData:
assetBundleName:
assetBundleVariant:

2
net.peeweek.gameplay-ingredients/Runtime/Actions/UnityEventAction.cs


namespace GameplayIngredients.Actions
{
public class SimpleAction : ActionBase
public class UnityEventAction : ActionBase
{
public UnityEvent OnExecute;

10
net.peeweek.gameplay-ingredients/Runtime/GameplayIngredients.asmdef


{
"name": "GameplayIngredients",
"references": [],
"references": [
"NaughtyAttributes"
],
"allowUnsafeCode": false
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}

7
net.peeweek.gameplay-ingredients/Runtime/Hooks/OnAwakeHook.cs


using NaughtyAttributes;
using UnityEngine.Events;
public UnityEvent onAwake;
[ReorderableList]
public Callable[] onAwake;
onAwake.Invoke();
Callable.Call(onAwake);
}
}
}

11
net.peeweek.gameplay-ingredients/Runtime/Hooks/OnEnableDisableHook.cs


using NaughtyAttributes;
using UnityEngine.Events;
namespace GameplayIngredients.Hooks

public UnityEvent OnEnableEvent;
public UnityEvent OnDisableEvent;
[ReorderableList]
public Callable[] OnEnableEvent;
[ReorderableList]
public Callable[] OnDisableEvent;
OnEnableEvent.Invoke();
Callable.Call(OnEnableEvent);
OnDisableEvent.Invoke();
Callable.Call(OnDisableEvent);
}
}
}

13
net.peeweek.gameplay-ingredients/Runtime/Hooks/OnKeyDownHook.cs


using NaughtyAttributes;
using UnityEngine.Events;
namespace GameplayIngredients.Hooks
{

public KeyCode Key = KeyCode.F5;
public UnityEvent OnKeyDownEvent;
public UnityEvent OnKeyUpEvent;
[ReorderableList]
public Callable[] OnKeyDownEvent;
[ReorderableList]
public Callable[] OnKeyUpEvent;
OnKeyDownEvent.Invoke();
Callable.Call(OnKeyDownEvent);
OnKeyUpEvent.Invoke();
Callable.Call(OnKeyUpEvent);
}
}
}

7
net.peeweek.gameplay-ingredients/Runtime/Hooks/OnMessageHook.cs


using UnityEngine.Events;
using NaughtyAttributes;
namespace GameplayIngredients.Hooks
{

public UnityEvent Event;
[ReorderableList]
public Callable[] OnMessageRecieved;
void OnEnable()
{

void Execute()
{
Event.Invoke();
Callable.Call(OnMessageRecieved);
}

8
net.peeweek.gameplay-ingredients/Runtime/Hooks/OnStartHook.cs


using UnityEngine;
using UnityEngine.Events;
using NaughtyAttributes;
public UnityEvent OnStart;
[ReorderableList]
public Callable[] OnStart;
OnStart.Invoke();
Callable.Call(OnStart);
}
}
}

18
net.peeweek.gameplay-ingredients/Runtime/Hooks/OnTriggerHook.cs


using NaughtyAttributes;
using UnityEngine.Events;
namespace GameplayIngredients.Hooks
{

private int m_RemainingEnterCount;
private int m_RemainingExitCount;
public UnityEvent onTriggerEnter;
public UnityEvent onTriggerExit;
[ReorderableList]
public Callable[] onTriggerEnter;
[ReorderableList]
public Callable[] onTriggerExit;
public bool OnlyInteractWithTag = true;
public string Tag = "Player";

}
if (OnlyInteractWithTag && other.tag == Tag )
{
onTriggerEnter.Invoke();
Callable.Call(onTriggerEnter);
onTriggerEnter.Invoke();
Callable.Call(onTriggerEnter);
}
}

}
if (OnlyInteractWithTag && other.tag == Tag )
{
onTriggerExit.Invoke();
Callable.Call(onTriggerExit);
onTriggerExit.Invoke();
Callable.Call(onTriggerExit);
}
}
}

12
net.peeweek.gameplay-ingredients/Runtime/Logic/ConditionalLogic.cs


using NaughtyAttributes;
using System;
using UnityEngine.Events;

{
public UnityEvent OnConditionValid;
public UnityEvent OnConditionInvalid;
[ReorderableList]
public Callable[] OnConditionValid;
[ReorderableList]
public Callable[] OnConditionInvalid;
OnConditionValid.Invoke();
Callable.Call(OnConditionValid);
OnConditionInvalid.Invoke();
Callable.Call(OnConditionInvalid);
}
public abstract bool GetCondition();

13
net.peeweek.gameplay-ingredients/Runtime/Logic/DelayedLogic.cs


using NaughtyAttributes;
using System.Collections;
using UnityEngine;
using UnityEngine.Events;

public class DelayedLogic : LogicBase
{
public float Delay = 1.0f;
public UnityEvent OnDelayComplete;
public UnityEvent OnCanceled;
[ReorderableList]
public Callable[] OnDelayComplete;
[ReorderableList]
public Callable[] OnCanceled;
IEnumerator m_Coroutine;

{
StopCoroutine(m_Coroutine);
OnCanceled.Invoke();
Callable.Call(OnCanceled);
m_Coroutine = null;
}
}

IEnumerator RunDelay(float Seconds)
{
yield return new WaitForSeconds(Seconds);
OnDelayComplete.Invoke();
Callable.Call(OnDelayComplete);
m_Coroutine = null;
}
}

10
net.peeweek.gameplay-ingredients/Runtime/Logic/LogicBase.cs


using NaughtyAttributes;
public abstract class LogicBase : MonoBehaviour
public abstract class LogicBase : Callable
public abstract void Execute();
public override sealed string ToString()
{
return "Logic : " + Name;
}

6
net.peeweek.gameplay-ingredients/Runtime/Logic/NextFrameLogic.cs


using NaughtyAttributes;
using System.Collections;
using UnityEngine;
using UnityEngine.Events;

public class NextFrameLogic : LogicBase
{
public UnityEvent OnComplete;
[ReorderableList]
public Callable[] OnComplete;
IEnumerator m_Coroutine;
public override void Execute()

IEnumerator RunDelay()
{
yield return new WaitForEndOfFrame();
OnComplete.Invoke();
Callable.Call(OnComplete);
m_Coroutine = null;
}
}

8
net.peeweek.gameplay-ingredients/Editor.meta


fileFormatVersion: 2
guid: dedb43ed8dff48a4ea95d29002e41ca4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
net.peeweek.gameplay-ingredients/NaughtyAttributes.meta


fileFormatVersion: 2
guid: bfdc546b0991bd54fb24ad7151d27f7e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

31
net.peeweek.gameplay-ingredients/Runtime/Callable.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace GameplayIngredients
{
public abstract class Callable : MonoBehaviour, ICallable
{
public string Name;
public Callable()
{
Name = GetType().Name;
}
public abstract void Execute();
public abstract new string ToString();
public static void Call(Callable[] calls)
{
foreach (var call in calls)
call.Execute();
}
public static void Call(Callable call)
{
call.Execute();
}
}
}

11
net.peeweek.gameplay-ingredients/Runtime/Callable.cs.meta


fileFormatVersion: 2
guid: 431c1fa7f2528b3479c2499997d85d8b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

12
net.peeweek.gameplay-ingredients/Runtime/ICallable.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace GameplayIngredients
{
public interface ICallable
{
void Execute();
}
}

11
net.peeweek.gameplay-ingredients/Runtime/ICallable.cs.meta


fileFormatVersion: 2
guid: 833e7b346ee69444a8fb1dec758945ad
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

33
net.peeweek.gameplay-ingredients/Runtime/Logic/EditorOnlyLogic.cs


using UnityEngine;
using UnityEngine.Events;
using NaughtyAttributes;
namespace GameplayIngredients.Logic
{
public class EditorOnlyLogic : LogicBase
{
public enum Mode
{
EditorOnly,
PlayerOnly
}
public Mode ExecutionPath;
[ReorderableList]
public Callable[] OnExecute;
public override void Execute()
{
switch(ExecutionPath)
{
case Mode.EditorOnly:
if (Application.isEditor) Callable.Call(OnExecute);
break;
case Mode.PlayerOnly:
if (!Application.isEditor) Callable.Call(OnExecute);
break;
}
}
}
}

17
net.peeweek.gameplay-ingredients/Editor/GameplayIngredients-Editor.asmdef


{
"name": "GameplayIngredients-Editor",
"references": [
"NaughtyAttributes",
"GameplayIngredients"
],
"optionalUnityReferences": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}

7
net.peeweek.gameplay-ingredients/Editor/GameplayIngredients-Editor.asmdef.meta


fileFormatVersion: 2
guid: a4e1a37fe12446f47976df6a3019ef5f
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
net.peeweek.gameplay-ingredients/Editor/PropertyDrawers.meta


fileFormatVersion: 2
guid: bdcec947a544c434fa0c9e9fc6d20f2b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

68
net.peeweek.gameplay-ingredients/Editor/PropertyDrawers/CallablePropertyDrawer.cs


using UnityEngine;
using UnityEditor;
namespace GameplayIngredients.Editor
{
[CustomPropertyDrawer(typeof(Callable))]
public class CallablePropertyDrawer : PropertyDrawer
{
private Callable setNextObjectValue = null;
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
if(setNextObjectValue != null)
{
property.objectReferenceValue = setNextObjectValue;
setNextObjectValue = null;
}
var pickRect = new Rect(position);
pickRect.xMin = pickRect.xMax - 84;
pickRect.xMax -= 30;
var gotoRect = new Rect(position);
gotoRect.xMin = gotoRect.xMax - 24;
var objRect = new Rect(position);
objRect.xMax -= 88;
var obj = EditorGUI.ObjectField(objRect, property.objectReferenceValue, typeof(Callable), true);
if (GUI.changed)
property.objectReferenceValue = obj;
if (GUI.Button(gotoRect, ">"))
{
Selection.activeObject = property.objectReferenceValue;
}
if (GUI.Button(pickRect, "Select"))
{
ShowMenu(property);
}
}
void ShowMenu(SerializedProperty property)
{
GenericMenu menu = new GenericMenu();
var components = (property.objectReferenceValue as Callable).gameObject.GetComponents<Callable>();
foreach(var component in components)
{
menu.AddItem(new GUIContent(component.GetType().Name + " - " + component.Name), component == property.objectReferenceValue, SetMenu, component);
}
menu.ShowAsContext();
}
void SetMenu(object o)
{
Callable component = o as Callable;
setNextObjectValue = component;
}
}
}

11
net.peeweek.gameplay-ingredients/Editor/PropertyDrawers/CallablePropertyDrawer.cs.meta


fileFormatVersion: 2
guid: 818c20fe94e0b0b4983ef38d6bc0eea4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

29
net.peeweek.gameplay-ingredients/Editor/PropertyDrawers/GameObjectTogglePropertyDrawer.cs


using UnityEngine;
using UnityEditor;
namespace GameplayIngredients.Editor
{
[CustomPropertyDrawer(typeof(Actions.ToggleGameObjectAction.GameObjectToggle))]
public class GameObjectTogglePropertyDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
var toggle = property.FindPropertyRelative("State");
var obj = property.FindPropertyRelative("GameObject");
var toggleRect = new Rect(position);
toggleRect.xMin = toggleRect.xMax - 80;
var objRect = new Rect(position);
objRect.xMax -= 80;
toggle.intValue = EditorGUI.IntPopup(toggleRect, toggle.intValue, labels, values);
obj.objectReferenceValue = EditorGUI.ObjectField(objRect, obj.objectReferenceValue, typeof(GameObject), true);
}
static GUIContent[] labels = { new GUIContent("Disable"), new GUIContent("Enable"), new GUIContent("Toggle") };
static int[] values = { 0, 1, 2 };
}
}

11
net.peeweek.gameplay-ingredients/Editor/PropertyDrawers/GameObjectTogglePropertyDrawer.cs.meta


fileFormatVersion: 2
guid: 2f3b8643af61a6d45ba4b8fdd82dfc50
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

10
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core.meta


fileFormatVersion: 2
guid: 1f67e408a6d0adf4ab29d095ccd8b116
folderAsset: yes
timeCreated: 1507998942
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

10
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawConditionAttributes.meta


fileFormatVersion: 2
guid: 0d8ad70d0e1e04248b1f5c5d5fb358f4
folderAsset: yes
timeCreated: 1508414568
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

9
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawConditionAttributes/DrawConditionAttribute.cs


using System;
namespace NaughtyAttributes
{
public class DrawConditionAttribute : NaughtyAttribute
{
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawConditionAttributes/DrawConditionAttribute.cs.meta


fileFormatVersion: 2
guid: 8fd9817e8bf3e054ab8e73b47bdce8c7
timeCreated: 1508414568
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

15
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawConditionAttributes/HideIfAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class HideIfAttribute : DrawConditionAttribute
{
public string ConditionName { get; private set; }
public HideIfAttribute(string conditionName)
{
this.ConditionName = conditionName;
}
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawConditionAttributes/HideIfAttribute.cs.meta


fileFormatVersion: 2
guid: aafc3a255165311419b7070198e7ffaf
timeCreated: 1508414568
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

15
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawConditionAttributes/ShowIfAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class ShowIfAttribute : DrawConditionAttribute
{
public string ConditionName { get; private set; }
public ShowIfAttribute(string conditionName)
{
this.ConditionName = conditionName;
}
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawConditionAttributes/ShowIfAttribute.cs.meta


fileFormatVersion: 2
guid: 6a9e9448e6e70094297d49ec9c82c6e1
timeCreated: 1508414568
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

10
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes.meta


fileFormatVersion: 2
guid: c76425e719cd4424d868674bcfb233f2
folderAsset: yes
timeCreated: 1508151410
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

15
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ButtonAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class ButtonAttribute : DrawerAttribute
{
public string Text { get; private set; }
public ButtonAttribute(string text = null)
{
this.Text = text;
}
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ButtonAttribute.cs.meta


fileFormatVersion: 2
guid: d61d9be90aa48764096a2bea37c9bd60
timeCreated: 1508591778
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

15
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/DisableIfAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class DisableIfAttribute : DrawerAttribute
{
public string ConditionName { get; private set; }
public DisableIfAttribute(string conditionName)
{
this.ConditionName = conditionName;
}
}
}

11
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/DisableIfAttribute.cs.meta


fileFormatVersion: 2
guid: dac53a514fd03bb48b3fae8d3d23bf78
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/DrawerAttribute.cs


using System;
namespace NaughtyAttributes
{
public abstract class DrawerAttribute : NaughtyAttribute
{
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/DrawerAttribute.cs.meta


fileFormatVersion: 2
guid: 57360d74732bf2749b2f8d5e0a0ea6f5
timeCreated: 1508151410
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

57
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/DropdownAttribute.cs


using System;
using System.Collections;
using System.Collections.Generic;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class DropdownAttribute : DrawerAttribute
{
public string ValuesFieldName { get; private set; }
public DropdownAttribute(string valuesFieldName)
{
this.ValuesFieldName = valuesFieldName;
}
}
public interface IDropdownList : IEnumerable<KeyValuePair<string, object>>
{
}
public class DropdownList<T> : IDropdownList
{
private List<KeyValuePair<string, object>> values;
public DropdownList()
{
this.values = new List<KeyValuePair<string, object>>();
}
public void Add(string displayName, T value)
{
this.values.Add(new KeyValuePair<string, object>(displayName, value));
}
public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
{
return this.values.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return this.GetEnumerator();
}
public static explicit operator DropdownList<object>(DropdownList<T> target)
{
DropdownList<object> result = new DropdownList<object>();
foreach (var kvp in target)
{
result.Add(kvp.Key, kvp.Value);
}
return result;
}
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/DropdownAttribute.cs.meta


fileFormatVersion: 2
guid: cd3b8c98b0803554e9152991fe806c62
timeCreated: 1508752474
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

15
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/EnableIfAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class EnableIfAttribute : DrawerAttribute
{
public string ConditionName { get; private set; }
public EnableIfAttribute(string conditionName)
{
this.ConditionName = conditionName;
}
}
}

11
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/EnableIfAttribute.cs.meta


fileFormatVersion: 2
guid: a3ef98b2c0ffe1b4c91fbec23d77898e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

17
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/MinMaxSliderAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class MinMaxSliderAttribute : DrawerAttribute
{
public float MinValue { get; private set; }
public float MaxValue { get; private set; }
public MinMaxSliderAttribute(float minValue, float maxValue)
{
this.MinValue = minValue;
this.MaxValue = maxValue;
}
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/MinMaxSliderAttribute.cs.meta


fileFormatVersion: 2
guid: 61d133a2d203a77419f35652a7f3fae0
timeCreated: 1508427131
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

32
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ProgressBarAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class ProgressBarAttribute : DrawerAttribute
{
public string Name { get; private set; }
public float MaxValue { get; private set; }
public ProgressBarColor Color { get; private set; }
public ProgressBarAttribute(string name = "", float maxValue = 100, ProgressBarColor color = ProgressBarColor.Blue)
{
Name = name;
MaxValue = maxValue;
Color = color;
}
}
public enum ProgressBarColor
{
Red,
Pink,
Orange,
Yellow,
Green,
Blue,
Indigo,
Violet,
White
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ProgressBarAttribute.cs.meta


fileFormatVersion: 2
guid: 8d8eb74e78cba7b43b3025525c5084b9
timeCreated: 1518435237
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ReadOnlyAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class ReadOnlyAttribute : DrawerAttribute
{
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ReadOnlyAttribute.cs.meta


fileFormatVersion: 2
guid: 4fa676ebc6d589c44817272871db148b
timeCreated: 1508862052
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ReorderableListAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class ReorderableListAttribute : DrawerAttribute
{
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ReorderableListAttribute.cs.meta


fileFormatVersion: 2
guid: ff85489452472c241987e5ba4c5e512a
timeCreated: 1508402303
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ResizableTextAreaAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class ResizableTextAreaAttribute : DrawerAttribute
{
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ResizableTextAreaAttribute.cs.meta


fileFormatVersion: 2
guid: 1793ea6e464ee6448930ecf133ed6a1d
timeCreated: 1508583166
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

17
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ShowAssetPreviewAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class ShowAssetPreviewAttribute : DrawerAttribute
{
public int Width { get; private set; }
public int Height { get; private set; }
public ShowAssetPreviewAttribute(int width = 64, int height = 64)
{
this.Width = width;
this.Height = height;
}
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ShowAssetPreviewAttribute.cs.meta


fileFormatVersion: 2
guid: 313b856a920a987418d6437a8e20a59f
timeCreated: 1509089502
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

11
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ShowNativePropertyAttribute.cs


using System;
using UnityEngine;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class ShowNativePropertyAttribute : DrawerAttribute
{
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ShowNativePropertyAttribute.cs.meta


fileFormatVersion: 2
guid: acc7d7e8ec9e47a4aaf4167698ae076f
timeCreated: 1510926376
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ShowNonSerializedFieldAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class ShowNonSerializedFieldAttribute : DrawerAttribute
{
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/ShowNonSerializedFieldAttribute.cs.meta


fileFormatVersion: 2
guid: a176aad85de73b34ba3ecd4f7baa367b
timeCreated: 1508835721
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

23
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/SliderAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class SliderAttribute : DrawerAttribute
{
public float MinValue { get; private set; }
public float MaxValue { get; private set; }
public SliderAttribute(float minValue, float maxValue)
{
this.MinValue = minValue;
this.MaxValue = maxValue;
}
public SliderAttribute(int minValue, int maxValue)
{
this.MaxValue = minValue;
this.MaxValue = maxValue;
}
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/DrawerAttributes/SliderAttribute.cs.meta


fileFormatVersion: 2
guid: f75eef8142877c345ba9b95046dd3bf6
timeCreated: 1508422518
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

10
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/GroupAttributes.meta


fileFormatVersion: 2
guid: 86ca4f90dd05bc448959ecd8f44097a7
folderAsset: yes
timeCreated: 1508330803
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/GroupAttributes/BoxGroupAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class BoxGroupAttribute : GroupAttribute
{
public BoxGroupAttribute(string name = "")
: base(name)
{
}
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/GroupAttributes/BoxGroupAttribute.cs.meta


fileFormatVersion: 2
guid: 88c5a8d79f9e72a43a4cfa67fd08fdd6
timeCreated: 1508326108
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

14
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/GroupAttributes/GroupAttribute.cs


using System;
namespace NaughtyAttributes
{
public abstract class GroupAttribute : NaughtyAttribute
{
public string Name { get; private set; }
public GroupAttribute(string name)
{
this.Name = name;
}
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/GroupAttributes/GroupAttribute.cs.meta


fileFormatVersion: 2
guid: beb48511ef6091e4ba054ad1b618933c
timeCreated: 1508326108
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

10
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/MetaAttributes.meta


fileFormatVersion: 2
guid: 51ee806b39c5fb343ae7d268404d8c67
folderAsset: yes
timeCreated: 1508497398
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

31
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/MetaAttributes/InfoBoxAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true, Inherited = true)]
public class InfoBoxAttribute : MetaAttribute
{
public string Text { get; private set; }
public InfoBoxType Type { get; private set; }
public string VisibleIf { get; private set; }
public InfoBoxAttribute(string text, InfoBoxType type = InfoBoxType.Normal, string visibleIf = null)
{
this.Text = text;
this.Type = type;
this.VisibleIf = visibleIf;
}
public InfoBoxAttribute(string text, string visibleIf)
: this(text, InfoBoxType.Normal, visibleIf)
{
}
}
public enum InfoBoxType
{
Normal,
Warning,
Error
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/MetaAttributes/InfoBoxAttribute.cs.meta


fileFormatVersion: 2
guid: 42c6184c84ab19d4382b06f9017f136d
timeCreated: 1508607449
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/MetaAttributes/MetaAttribute.cs


using System;
namespace NaughtyAttributes
{
public abstract class MetaAttribute : NaughtyAttribute
{
public int Order { get; set; }
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/MetaAttributes/MetaAttribute.cs.meta


fileFormatVersion: 2
guid: fcd6d339bcd667044a48d41a78a7830c
timeCreated: 1508497398
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

15
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/MetaAttributes/OnValueChangedAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true, Inherited = true)]
public class OnValueChangedAttribute : MetaAttribute
{
public string CallbackName { get; private set; }
public OnValueChangedAttribute(string callbackName)
{
this.CallbackName = callbackName;
}
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/MetaAttributes/OnValueChangedAttribute.cs.meta


fileFormatVersion: 2
guid: a144cdc17b6e4cf4f86692ae1dc7e4d7
timeCreated: 1508610277
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

9
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/NaughtyAttribute.cs


using System;
namespace NaughtyAttributes
{
// The base class for all naughty attributes
public class NaughtyAttribute : Attribute
{
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/NaughtyAttribute.cs.meta


fileFormatVersion: 2
guid: 1accb89cb44c4a342a1857e5e3d13abb
timeCreated: 1508052914
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/NaughtyAttributes.asmdef


{
"name": "NaughtyAttributes",
"references": [],
"optionalUnityReferences": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false
}

7
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/NaughtyAttributes.asmdef.meta


fileFormatVersion: 2
guid: 8159fdb6c7801b34fb01c3bf046a6e57
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

10
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/ValidatorAttributes.meta


fileFormatVersion: 2
guid: 8a655727c2e629a438ad94f60080b9ea
folderAsset: yes
timeCreated: 1508151410
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

20
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/ValidatorAttributes/MaxValueAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class MaxValueAttribute : ValidatorAttribute
{
public float MaxValue { get; private set; }
public MaxValueAttribute(float maxValue)
{
this.MaxValue = maxValue;
}
public MaxValueAttribute(int maxValue)
{
this.MaxValue = maxValue;
}
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/ValidatorAttributes/MaxValueAttribute.cs.meta


fileFormatVersion: 2
guid: e018059e7fe12fd42a3a1bba0dbbf9c5
timeCreated: 1508047804
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

20
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/ValidatorAttributes/MinValueAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class MinValueAttribute : ValidatorAttribute
{
public float MinValue { get; private set; }
public MinValueAttribute(float minValue)
{
this.MinValue = minValue;
}
public MinValueAttribute(int minValue)
{
this.MinValue = minValue;
}
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/ValidatorAttributes/MinValueAttribute.cs.meta


fileFormatVersion: 2
guid: 337be62eb8c929f4ab8b3d495a712a56
timeCreated: 1508048805
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

15
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/ValidatorAttributes/RequiredAttribute.cs


using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class RequiredAttribute : ValidatorAttribute
{
public string Message { get; private set; }
public RequiredAttribute(string message = null)
{
this.Message = message;
}
}
}

13
net.peeweek.gameplay-ingredients/NaughtyAttributes/Core/ValidatorAttributes/RequiredAttribute.cs.meta


fileFormatVersion: 2
guid: 0b70ebd0fbd89c648981f08469806779
timeCreated: 1508655546
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存