forked from Shardstone/trail-into-darkness
Some renaming and added more settings
This commit is contained in:
@@ -60,6 +60,7 @@ namespace Nox.Game {
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public sealed record Attribute {
|
||||
private readonly int values;
|
||||
public AttributeType attribute;
|
||||
@@ -71,12 +72,7 @@ namespace Nox.Game {
|
||||
|
||||
[Serializable]
|
||||
public sealed class EntityAttributes {
|
||||
public Attribute[] attributes = {
|
||||
new(AttributeType.Might, 1),
|
||||
new(AttributeType.Reflex, 1),
|
||||
new(AttributeType.Knowledge, 1),
|
||||
new(AttributeType.Perception, 1)
|
||||
};
|
||||
public Attribute[] attributes;
|
||||
|
||||
public static EntityAttributes operator +(EntityAttributes a, EntityAttributes b) {
|
||||
return new EntityAttributes {
|
||||
@@ -90,12 +86,7 @@ namespace Nox.Game {
|
||||
|
||||
[Serializable]
|
||||
public sealed class EntityStats {
|
||||
public Stat[] stats = {
|
||||
new(StatType.Health, 0),
|
||||
new(StatType.Stamina, 0),
|
||||
new(StatType.Level, 1),
|
||||
new(StatType.Experience, 0)
|
||||
};
|
||||
public Stat[] stats;
|
||||
|
||||
public int GetValue(StatType statType) {
|
||||
return stats.First(stat => stat.type == statType).value;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Jovian.InspectorTools;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Jovian.Utilities;
|
||||
|
||||
namespace Nox.Game {
|
||||
public interface IModfiersFactory {
|
||||
@@ -11,7 +11,7 @@ namespace Nox.Game {
|
||||
bool TryAddModifier(CharacterDefinition character, string modiferId);
|
||||
}
|
||||
|
||||
public enum ModifierRole {
|
||||
public enum ModifierOperation {
|
||||
None,
|
||||
Flat,
|
||||
Addition,
|
||||
@@ -21,10 +21,12 @@ namespace Nox.Game {
|
||||
|
||||
[Serializable]
|
||||
public sealed class ModifierDefinition {
|
||||
public System.Guid id = Guid.NewGuid();
|
||||
public string name;
|
||||
[ReadOnly]
|
||||
public Guid id = Guid.NewGuid();
|
||||
public StatType statType;
|
||||
public AttributeType attributeType;
|
||||
public ModifierRole role;
|
||||
public ModifierOperation operation;
|
||||
public float value;
|
||||
}
|
||||
|
||||
@@ -35,10 +37,14 @@ namespace Nox.Game {
|
||||
|
||||
public class ModifiersFactory : IModfiersFactory {
|
||||
private readonly ModifiersRegistry modifiersRegistry;
|
||||
private readonly Dictionary<string, ModifierDefinition> modifierPool = new ();
|
||||
private readonly Dictionary<Guid, ModifierDefinition> modifierPool = new ();
|
||||
|
||||
public ModifiersFactory(ModifiersRegistry modifiersRegistry) {
|
||||
this.modifiersRegistry = modifiersRegistry;
|
||||
var allAvailableModifiers = modifiersRegistry.modifiersData;
|
||||
foreach(var modifier in allAvailableModifiers.modifiers) {
|
||||
modifierPool.Add(modifier.id, modifier);
|
||||
}
|
||||
}
|
||||
|
||||
public IReadOnlyCollection<ModifierDefinition> GetAll() {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Jovian.InspectorTools;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -13,8 +14,9 @@ namespace Nox.Game {
|
||||
|
||||
[Serializable]
|
||||
public sealed class PerkDefinition {
|
||||
public Guid id;
|
||||
public string name;
|
||||
[ReadOnly]
|
||||
public Guid id;
|
||||
public ModifiersData modifiers = new ();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,92 +21,59 @@ MonoBehaviour:
|
||||
points: 10
|
||||
- class: 4
|
||||
points: 10
|
||||
defaultEntityAttributes:
|
||||
attributes:
|
||||
- attribute: 1
|
||||
value: 1
|
||||
- attribute: 2
|
||||
value: 1
|
||||
- attribute: 3
|
||||
value: 1
|
||||
- attribute: 4
|
||||
value: 1
|
||||
defaultEntityStats:
|
||||
stats:
|
||||
- type: 0
|
||||
value: 0
|
||||
- type: 3
|
||||
value: 1
|
||||
- type: 1
|
||||
value: 0
|
||||
- type: 2
|
||||
value: 1
|
||||
- type: 3
|
||||
value: 0
|
||||
- type: 4
|
||||
value: 0
|
||||
defaultPerksData:
|
||||
perks: []
|
||||
defaultModifiersData:
|
||||
modifiers:
|
||||
- id: 0
|
||||
type: 3
|
||||
- name: Global Health Modifier per MGT
|
||||
statType: 1
|
||||
attributeType: 0
|
||||
operation: 3
|
||||
value: 3
|
||||
- id: 2
|
||||
type: 3
|
||||
- name: Global Stamina modifier per MGT
|
||||
statType: 2
|
||||
attributeType: 0
|
||||
operation: 3
|
||||
value: 1
|
||||
- id: 3
|
||||
type: 3
|
||||
- name: Global Stamina Modifier per KNO
|
||||
statType: 2
|
||||
attributeType: 0
|
||||
operation: 3
|
||||
value: 2
|
||||
racialBonuses:
|
||||
- race: 1
|
||||
bonusStats:
|
||||
stats:
|
||||
- type: 0
|
||||
value: 10
|
||||
- type: 0
|
||||
value: 10
|
||||
- type: 0
|
||||
value: 1
|
||||
- type: 0
|
||||
value: 0
|
||||
startingPerks:
|
||||
perks: []
|
||||
permanentModifiers:
|
||||
modifiers: []
|
||||
- race: 2
|
||||
bonusStats:
|
||||
stats:
|
||||
- type: 0
|
||||
value: 10
|
||||
- type: 0
|
||||
value: 10
|
||||
- type: 0
|
||||
value: 1
|
||||
- type: 0
|
||||
value: 0
|
||||
startingPerks:
|
||||
perks: []
|
||||
permanentModifiers:
|
||||
modifiers: []
|
||||
- race: 2
|
||||
bonusStats:
|
||||
stats:
|
||||
- type: 0
|
||||
value: 10
|
||||
- type: 0
|
||||
value: 10
|
||||
- type: 0
|
||||
value: 1
|
||||
- type: 0
|
||||
value: 0
|
||||
startingPerks:
|
||||
perks: []
|
||||
permanentModifiers:
|
||||
modifiers: []
|
||||
racialBonuses: []
|
||||
classBonuses:
|
||||
- class: 1
|
||||
bonusAttributes:
|
||||
attributes: []
|
||||
bonusStats:
|
||||
stats:
|
||||
- type: 0
|
||||
value: 10
|
||||
- type: 0
|
||||
value: 10
|
||||
- type: 0
|
||||
value: 1
|
||||
- type: 0
|
||||
value: 0
|
||||
stats: []
|
||||
startingPerks:
|
||||
perks: []
|
||||
permanentModifiers:
|
||||
modifiers:
|
||||
- id: 1
|
||||
type: 3
|
||||
- name: Warrior Health per MGT
|
||||
statType: 1
|
||||
attributeType: 0
|
||||
operation: 3
|
||||
value: 4
|
||||
maxPartySize: 4
|
||||
|
||||
@@ -7,7 +7,7 @@ using UnityEngine;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public class AnimatorParameterAttribute : PropertyAttribute {
|
||||
public readonly string animatorPropertyName;
|
||||
public bool allParameterTypes;
|
||||
@@ -26,7 +26,7 @@ namespace InspectorToolkit {
|
||||
}
|
||||
}
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
[CustomPropertyDrawer(typeof(AnimatorParameterAttribute))]
|
||||
public class AnimatorParameterAttributeDrawer : PropertyDrawer {
|
||||
private bool hasAnimator;
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Reflection;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
public abstract class ArrayAttribute : Attribute {
|
||||
|
||||
@@ -5,7 +5,7 @@ using Jovian.Utilities;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
/// <summary>
|
||||
/// Finds all objects in the project matching <c>filter</c> string and lists alphabetically in a dropdown (if they are <c>assetType</c>)
|
||||
@@ -24,7 +24,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using UnityEditor;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
public abstract class AttributeBase : PropertyAttribute
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(AttributeBase), true)]
|
||||
public class AttributeBaseDrawer : PropertyDrawer
|
||||
|
||||
@@ -8,7 +8,7 @@ using Object = UnityEngine.Object;
|
||||
#if UNITY_EDITOR
|
||||
#endif
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public enum AutoFindScope {
|
||||
Self,
|
||||
SelfAndChildren,
|
||||
@@ -51,7 +51,7 @@ namespace InspectorToolkit {
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
[CustomPropertyDrawer(typeof(AutoFindAttribute))]
|
||||
public class AutoFindAttributeDrawer : PropertyDrawer {
|
||||
private GUIContent searchButtonContent;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
public class BitmaskAttribute : PropertyAttribute {
|
||||
public string[] groupNames;
|
||||
@@ -12,7 +12,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
|
||||
[CustomPropertyDrawer(typeof(BitmaskAttribute))]
|
||||
|
||||
@@ -9,7 +9,7 @@ using Jovian.Utilities;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public class ButtonMethodAttribute : PropertyAttribute {
|
||||
public readonly ButtonMethodDrawOrder DrawOrder;
|
||||
@@ -33,7 +33,7 @@ namespace InspectorToolkit {
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
/// <summary>
|
||||
/// Validate a string field to only allow or disallow a set of pre-defined
|
||||
@@ -43,7 +43,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using UnityEditor;
|
||||
using EditorTools;
|
||||
|
||||
@@ -7,12 +7,12 @@ using System.Text;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public class CompactDrawerAttribute : PropertyAttribute { }
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
[CustomPropertyDrawer(typeof(CompactDrawerAttribute))]
|
||||
public class CompactDrawerAttributeDrawer : PropertyDrawer {
|
||||
private static readonly List<SerializedProperty> cacheProperties = new();
|
||||
|
||||
@@ -3,7 +3,7 @@ using UnityEngine;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public class CompactVector4Attribute : PropertyAttribute {
|
||||
public CompactVector4Attribute() {
|
||||
}
|
||||
@@ -11,7 +11,7 @@ namespace InspectorToolkit {
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
[CustomPropertyDrawer(typeof(CompactVector4Attribute))]
|
||||
public class CompactVector4AttributeDrawer : PropertyDrawer {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
/// <summary>
|
||||
/// Conditionally Show/Hide field in inspector, based on some other field value
|
||||
/// </summary>
|
||||
@@ -26,7 +26,7 @@ namespace InspectorToolkit {
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
using EditorTools;
|
||||
using UnityEditor;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
public class ConstantsSelectionAttribute : PropertyAttribute
|
||||
{
|
||||
@@ -17,7 +17,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using UnityEditor;
|
||||
using EditorTools;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
/// <summary>
|
||||
/// Create Popup with predefined values for string, int or float property
|
||||
@@ -19,7 +19,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using UnityEditor;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
/// <summary>
|
||||
/// Use to display inspector of property object
|
||||
@@ -18,7 +18,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using EditorTools;
|
||||
using UnityEditor;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
public class FoldoutAttribute : PropertyAttribute
|
||||
{
|
||||
@@ -27,7 +27,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public class InfoAttribute : PropertyAttribute {
|
||||
public enum MessageType {
|
||||
Info,
|
||||
@@ -34,7 +34,7 @@ namespace InspectorToolkit {
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
using UnityEditor;
|
||||
|
||||
[CustomPropertyDrawer(typeof(InfoAttribute))]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
/// <summary>
|
||||
/// Field will be Read-Only in Playmode
|
||||
@@ -11,7 +11,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using UnityEditor;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public class InterfaceComponentAttribute : PropertyAttribute {
|
||||
public readonly Type interfaceType;
|
||||
public readonly bool allowMismatch;
|
||||
@@ -14,7 +14,7 @@ namespace InspectorToolkit {
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
using UnityEditor;
|
||||
|
||||
[CustomPropertyDrawer(typeof(InterfaceComponentAttribute))]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
public class LayerAttribute : PropertyAttribute
|
||||
{
|
||||
@@ -8,7 +8,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using UnityEditor;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public class LinkAttribute : PropertyAttribute {
|
||||
|
||||
public readonly string message;
|
||||
@@ -15,7 +15,7 @@ namespace InspectorToolkit {
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
|
||||
[CustomPropertyDrawer(typeof(LinkAttribute))]
|
||||
public class LinkAttributeDrawer : PropertyDrawer {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using InspectorToolkit.Internal;
|
||||
using Jovian.InspectorTools.Internal;
|
||||
using UnityEngine;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
using InspectorToolkit.EditorTools;
|
||||
using Jovian.InspectorTools.EditorTools;
|
||||
#endif
|
||||
|
||||
#pragma warning disable 0414
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
public class MaxValueAttribute : AttributeBase
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public class MinMaxRangeAttribute : PropertyAttribute {
|
||||
public MinMaxRangeAttribute(float min, float max) {
|
||||
Min = min;
|
||||
@@ -59,7 +59,7 @@ namespace InspectorToolkit {
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
using UnityEditor;
|
||||
|
||||
[CustomPropertyDrawer(typeof(MinMaxRangeAttribute))]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using InspectorToolkit.Internal;
|
||||
using Jovian.InspectorTools.Internal;
|
||||
using UnityEngine;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
using InspectorToolkit.EditorTools;
|
||||
using Jovian.InspectorTools.EditorTools;
|
||||
#endif
|
||||
|
||||
#pragma warning disable 0414
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
public class MinValueAttribute : AttributeBase
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Linq;
|
||||
using Jovian.Utilities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
/// <summary>
|
||||
/// Finds all objects in the project of 'objectType' then creates a dropdown showing all values matching 'memberName'
|
||||
@@ -25,7 +25,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using UnityEditor;
|
||||
using System.Reflection;
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public class OnValueChangedAttribute : PropertyAttribute {
|
||||
public readonly string methodName;
|
||||
public OnValueChangedAttribute(string methodName) {
|
||||
@@ -12,7 +12,7 @@ namespace InspectorToolkit {
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
|
||||
[CustomPropertyDrawer(typeof(OnValueChangedAttribute))]
|
||||
public class OnValueChangedAttributeDrawer : PropertyDrawer {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public class OptionalAttribute : PropertyAttribute { }
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
|
||||
[CustomPropertyDrawer(typeof(OptionalAttribute))]
|
||||
public class OptionalAttributePropertyDrawer : PropertyDrawer {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
public class OverrideLabelAttribute : PropertyAttribute
|
||||
{
|
||||
@@ -11,7 +11,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using UnityEditor;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
public class PositiveValueOnlyAttribute : PropertyAttribute
|
||||
{
|
||||
@@ -15,7 +15,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using UnityEditor;
|
||||
using EditorTools;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
public class ReadOnlyAttribute : ConditionalFieldAttribute
|
||||
{
|
||||
@@ -15,7 +15,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using UnityEditor;
|
||||
|
||||
@@ -45,4 +45,4 @@ namespace InspectorToolkit.Internal
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
/// <summary>
|
||||
/// Validate a string field by regex expression
|
||||
@@ -42,7 +42,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using UnityEditor;
|
||||
using EditorTools;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using System;
|
||||
using InspectorToolkit.Internal;
|
||||
using Jovian.InspectorTools.Internal;
|
||||
using Jovian.Utilities.Editor;
|
||||
using UnityEngine;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public class RequireArraySizeAttribute : ArrayAttribute, IPropertyCondition {
|
||||
|
||||
public readonly int size;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class RequireLayerAttribute : Attribute
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -3,10 +3,10 @@ using UnityEngine;
|
||||
#if UNITY_EDITOR
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using InspectorToolkit.EditorTools;
|
||||
using Jovian.InspectorTools.EditorTools;
|
||||
#endif
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
/// <summary>
|
||||
/// Does not work on objects with children - will break their UI
|
||||
/// </summary>
|
||||
@@ -55,7 +55,7 @@ namespace InspectorToolkit {
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
[CustomPropertyDrawer(typeof(RequireMethodAttribute))]
|
||||
public class RequireMethodAttributePropertyDrawer : PropertyDrawer {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class RequireTagAttribute : Attribute
|
||||
|
||||
@@ -7,7 +7,7 @@ using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
#endif
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public class RequiredAttribute : PropertyAttribute, IPropertyCondition {
|
||||
|
||||
public enum Scope {
|
||||
@@ -239,7 +239,7 @@ namespace InspectorToolkit {
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
[CustomPropertyDrawer(typeof(RequiredAttribute))]
|
||||
public class RequiredAttributePropertyDrawer : PropertyDrawer {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ using System;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
/// <summary>
|
||||
/// Used to pick scene from inspector.
|
||||
@@ -20,7 +20,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using UnityEditor;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ using UnityEngine;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
/// <summary>
|
||||
/// Put this attribute on a public (or SerializeField) enum in a
|
||||
@@ -26,7 +26,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
/// <summary>
|
||||
/// Draws the custom enum selector popup for enum fields using the
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
public class SeparatorAttribute : PropertyAttribute
|
||||
{
|
||||
@@ -22,7 +22,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using UnityEditor;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ using Jovian.Utilities;
|
||||
using UnityObject = UnityEngine.Object;
|
||||
#endif
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
|
||||
public class ShowInInspectorAttribute : PropertyAttribute {
|
||||
public readonly PlayModeVisibility Visibility;
|
||||
@@ -29,7 +29,7 @@ namespace InspectorToolkit {
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
public class ShowInInspectorAttributeHandler {
|
||||
private const int MAX_DEPTH = 10;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ using UnityEngine;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
public class SpriteLayerAttribute : PropertyAttribute
|
||||
{
|
||||
@@ -18,7 +18,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(SpriteLayerAttribute))]
|
||||
public class SpriteLayerAttributeDrawer : PropertyDrawer
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public class SuffixAttribute : PropertyAttribute {
|
||||
public readonly string suffix;
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace InspectorToolkit {
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
using UnityEditor;
|
||||
|
||||
[CustomPropertyDrawer(typeof(SuffixAttribute))]
|
||||
|
||||
@@ -10,7 +10,7 @@ using UnityEngine;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
public class TagAttribute : PropertyAttribute
|
||||
{
|
||||
@@ -18,7 +18,7 @@ namespace InspectorToolkit
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(TagAttribute))]
|
||||
public class TagAttributeDrawer : PropertyDrawer
|
||||
|
||||
@@ -3,7 +3,7 @@ using UnityEngine;
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public class UniformVector3Attribute : PropertyAttribute {
|
||||
public UniformVector3Attribute() {
|
||||
}
|
||||
@@ -11,7 +11,7 @@ namespace InspectorToolkit {
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
[CustomPropertyDrawer(typeof(UniformVector3Attribute))]
|
||||
public class UniformVector3AttributeDrawer : PropertyDrawer {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace InspectorToolkit.EditorTools {
|
||||
namespace Jovian.InspectorTools.EditorTools {
|
||||
public static class MyGUI {
|
||||
#region Colors
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Reflection;
|
||||
using UnityEditor;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace InspectorToolkit.EditorTools {
|
||||
namespace Jovian.InspectorTools.EditorTools {
|
||||
public static class MySerializedProperty {
|
||||
#region Collections Handling
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public static class MyCollections {
|
||||
/// <summary>
|
||||
/// Returns new array with inserted empty element at index
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace InspectorToolkit
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
public static class MyRegex
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public static class AutoFindUtil {
|
||||
public static void Search(AutoFindAttribute autoFindAttribute, SerializedProperty property, bool autoAddIfMissing = false) {
|
||||
Type propertyType = EditorSerializationUtility.GetTypeFromProperty(property);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public interface IActionableAttribute {
|
||||
#if UNITY_EDITOR
|
||||
void Trigger(SerializedProperty serializedProperty);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public interface IPropertyCondition {
|
||||
#if UNITY_EDITOR
|
||||
bool DoesPropertyMeetCondition(SerializedProperty property, out string description);
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace InspectorToolkit {
|
||||
namespace Jovian.InspectorTools {
|
||||
public enum PlayModeVisibility {
|
||||
Always,
|
||||
EditMode,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using UnityEngine;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
|
||||
public interface IGUILayoutPropertyField {
|
||||
void GUILayoutPropertyField(SerializedProperty serializedProperty, params GUILayoutOption[] options);
|
||||
|
||||
@@ -3,7 +3,7 @@ using UnityEngine;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
namespace InspectorToolkit.Internal {
|
||||
namespace Jovian.InspectorTools.Internal {
|
||||
|
||||
public static class RequiredUtil {
|
||||
private const float ICON_X_OFFSET = 15f;
|
||||
|
||||
Reference in New Issue
Block a user