Some renaming and added more settings

This commit is contained in:
Sebastian Bularca
2026-03-29 19:16:39 +02:00
parent 71b432e253
commit 00c1764fdb
59 changed files with 149 additions and 183 deletions

View File

@@ -60,6 +60,7 @@ namespace Nox.Game {
} }
} }
[Serializable]
public sealed record Attribute { public sealed record Attribute {
private readonly int values; private readonly int values;
public AttributeType attribute; public AttributeType attribute;
@@ -71,12 +72,7 @@ namespace Nox.Game {
[Serializable] [Serializable]
public sealed class EntityAttributes { public sealed class EntityAttributes {
public Attribute[] attributes = { public Attribute[] attributes;
new(AttributeType.Might, 1),
new(AttributeType.Reflex, 1),
new(AttributeType.Knowledge, 1),
new(AttributeType.Perception, 1)
};
public static EntityAttributes operator +(EntityAttributes a, EntityAttributes b) { public static EntityAttributes operator +(EntityAttributes a, EntityAttributes b) {
return new EntityAttributes { return new EntityAttributes {
@@ -90,12 +86,7 @@ namespace Nox.Game {
[Serializable] [Serializable]
public sealed class EntityStats { public sealed class EntityStats {
public Stat[] stats = { public Stat[] stats;
new(StatType.Health, 0),
new(StatType.Stamina, 0),
new(StatType.Level, 1),
new(StatType.Experience, 0)
};
public int GetValue(StatType statType) { public int GetValue(StatType statType) {
return stats.First(stat => stat.type == statType).value; return stats.First(stat => stat.type == statType).value;

View File

@@ -1,7 +1,7 @@
using Jovian.InspectorTools;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Jovian.Utilities;
namespace Nox.Game { namespace Nox.Game {
public interface IModfiersFactory { public interface IModfiersFactory {
@@ -11,7 +11,7 @@ namespace Nox.Game {
bool TryAddModifier(CharacterDefinition character, string modiferId); bool TryAddModifier(CharacterDefinition character, string modiferId);
} }
public enum ModifierRole { public enum ModifierOperation {
None, None,
Flat, Flat,
Addition, Addition,
@@ -21,10 +21,12 @@ namespace Nox.Game {
[Serializable] [Serializable]
public sealed class ModifierDefinition { public sealed class ModifierDefinition {
public System.Guid id = Guid.NewGuid(); public string name;
[ReadOnly]
public Guid id = Guid.NewGuid();
public StatType statType; public StatType statType;
public AttributeType attributeType; public AttributeType attributeType;
public ModifierRole role; public ModifierOperation operation;
public float value; public float value;
} }
@@ -35,10 +37,14 @@ namespace Nox.Game {
public class ModifiersFactory : IModfiersFactory { public class ModifiersFactory : IModfiersFactory {
private readonly ModifiersRegistry modifiersRegistry; private readonly ModifiersRegistry modifiersRegistry;
private readonly Dictionary<string, ModifierDefinition> modifierPool = new (); private readonly Dictionary<Guid, ModifierDefinition> modifierPool = new ();
public ModifiersFactory(ModifiersRegistry modifiersRegistry) { public ModifiersFactory(ModifiersRegistry modifiersRegistry) {
this.modifiersRegistry = modifiersRegistry; this.modifiersRegistry = modifiersRegistry;
var allAvailableModifiers = modifiersRegistry.modifiersData;
foreach(var modifier in allAvailableModifiers.modifiers) {
modifierPool.Add(modifier.id, modifier);
}
} }
public IReadOnlyCollection<ModifierDefinition> GetAll() { public IReadOnlyCollection<ModifierDefinition> GetAll() {

View File

@@ -1,3 +1,4 @@
using Jovian.InspectorTools;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@@ -13,8 +14,9 @@ namespace Nox.Game {
[Serializable] [Serializable]
public sealed class PerkDefinition { public sealed class PerkDefinition {
public Guid id;
public string name; public string name;
[ReadOnly]
public Guid id;
public ModifiersData modifiers = new (); public ModifiersData modifiers = new ();
} }

View File

@@ -21,92 +21,59 @@ MonoBehaviour:
points: 10 points: 10
- class: 4 - class: 4
points: 10 points: 10
defaultEntityAttributes:
attributes:
- attribute: 1
value: 1
- attribute: 2
value: 1
- attribute: 3
value: 1
- attribute: 4
value: 1
defaultEntityStats: defaultEntityStats:
stats: stats:
- type: 0 - type: 3
value: 0 value: 1
- type: 1 - type: 1
value: 0 value: 0
- type: 2 - type: 2
value: 1 value: 0
- type: 3 - type: 4
value: 0 value: 0
defaultPerksData: defaultPerksData:
perks: [] perks: []
defaultModifiersData: defaultModifiersData:
modifiers: modifiers:
- id: 0 - name: Global Health Modifier per MGT
type: 3 statType: 1
attributeType: 0
operation: 3
value: 3 value: 3
- id: 2 - name: Global Stamina modifier per MGT
type: 3 statType: 2
attributeType: 0
operation: 3
value: 1 value: 1
- id: 3 - name: Global Stamina Modifier per KNO
type: 3 statType: 2
attributeType: 0
operation: 3
value: 2 value: 2
racialBonuses: 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: []
classBonuses: classBonuses:
- class: 1 - class: 1
bonusAttributes:
attributes: []
bonusStats: bonusStats:
stats: stats: []
- type: 0
value: 10
- type: 0
value: 10
- type: 0
value: 1
- type: 0
value: 0
startingPerks: startingPerks:
perks: [] perks: []
permanentModifiers: permanentModifiers:
modifiers: modifiers:
- id: 1 - name: Warrior Health per MGT
type: 3 statType: 1
attributeType: 0
operation: 3
value: 4 value: 4
maxPartySize: 4 maxPartySize: 4

View File

@@ -7,7 +7,7 @@ using UnityEngine;
using UnityEditor; using UnityEditor;
#endif #endif
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public class AnimatorParameterAttribute : PropertyAttribute { public class AnimatorParameterAttribute : PropertyAttribute {
public readonly string animatorPropertyName; public readonly string animatorPropertyName;
public bool allParameterTypes; public bool allParameterTypes;
@@ -26,7 +26,7 @@ namespace InspectorToolkit {
} }
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
[CustomPropertyDrawer(typeof(AnimatorParameterAttribute))] [CustomPropertyDrawer(typeof(AnimatorParameterAttribute))]
public class AnimatorParameterAttributeDrawer : PropertyDrawer { public class AnimatorParameterAttributeDrawer : PropertyDrawer {
private bool hasAnimator; private bool hasAnimator;

View File

@@ -7,7 +7,7 @@ using System.Reflection;
using UnityEditor; using UnityEditor;
#endif #endif
namespace InspectorToolkit { namespace Jovian.InspectorTools {
[AttributeUsage(AttributeTargets.Field)] [AttributeUsage(AttributeTargets.Field)]
public abstract class ArrayAttribute : Attribute { public abstract class ArrayAttribute : Attribute {

View File

@@ -5,7 +5,7 @@ using Jovian.Utilities;
using UnityEngine; using UnityEngine;
using Object = UnityEngine.Object; using Object = UnityEngine.Object;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
/// <summary> /// <summary>
/// Finds all objects in the project matching <c>filter</c> string and lists alphabetically in a dropdown (if they are <c>assetType</c>) /// 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 #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using UnityEditor; using UnityEditor;

View File

@@ -1,7 +1,7 @@
using System; using System;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
[AttributeUsage(AttributeTargets.Field)] [AttributeUsage(AttributeTargets.Field)]
public abstract class AttributeBase : PropertyAttribute public abstract class AttributeBase : PropertyAttribute

View File

@@ -3,7 +3,7 @@ using System.Linq;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
[CustomPropertyDrawer(typeof(AttributeBase), true)] [CustomPropertyDrawer(typeof(AttributeBase), true)]
public class AttributeBaseDrawer : PropertyDrawer public class AttributeBaseDrawer : PropertyDrawer

View File

@@ -8,7 +8,7 @@ using Object = UnityEngine.Object;
#if UNITY_EDITOR #if UNITY_EDITOR
#endif #endif
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public enum AutoFindScope { public enum AutoFindScope {
Self, Self,
SelfAndChildren, SelfAndChildren,
@@ -51,7 +51,7 @@ namespace InspectorToolkit {
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
[CustomPropertyDrawer(typeof(AutoFindAttribute))] [CustomPropertyDrawer(typeof(AutoFindAttribute))]
public class AutoFindAttributeDrawer : PropertyDrawer { public class AutoFindAttributeDrawer : PropertyDrawer {
private GUIContent searchButtonContent; private GUIContent searchButtonContent;

View File

@@ -1,7 +1,7 @@
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
public class BitmaskAttribute : PropertyAttribute { public class BitmaskAttribute : PropertyAttribute {
public string[] groupNames; public string[] groupNames;
@@ -12,7 +12,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
[CustomPropertyDrawer(typeof(BitmaskAttribute))] [CustomPropertyDrawer(typeof(BitmaskAttribute))]

View File

@@ -9,7 +9,7 @@ using Jovian.Utilities;
using UnityEngine; using UnityEngine;
using Object = UnityEngine.Object; using Object = UnityEngine.Object;
namespace InspectorToolkit { namespace Jovian.InspectorTools {
[AttributeUsage(AttributeTargets.Method)] [AttributeUsage(AttributeTargets.Method)]
public class ButtonMethodAttribute : PropertyAttribute { public class ButtonMethodAttribute : PropertyAttribute {
public readonly ButtonMethodDrawOrder DrawOrder; public readonly ButtonMethodDrawOrder DrawOrder;
@@ -33,7 +33,7 @@ namespace InspectorToolkit {
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
/// <summary> /// <summary>
/// Validate a string field to only allow or disallow a set of pre-defined /// Validate a string field to only allow or disallow a set of pre-defined
@@ -43,7 +43,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using UnityEditor; using UnityEditor;
using EditorTools; using EditorTools;

View File

@@ -7,12 +7,12 @@ using System.Text;
using UnityEditor; using UnityEditor;
#endif #endif
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public class CompactDrawerAttribute : PropertyAttribute { } public class CompactDrawerAttribute : PropertyAttribute { }
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
[CustomPropertyDrawer(typeof(CompactDrawerAttribute))] [CustomPropertyDrawer(typeof(CompactDrawerAttribute))]
public class CompactDrawerAttributeDrawer : PropertyDrawer { public class CompactDrawerAttributeDrawer : PropertyDrawer {
private static readonly List<SerializedProperty> cacheProperties = new(); private static readonly List<SerializedProperty> cacheProperties = new();

View File

@@ -3,7 +3,7 @@ using UnityEngine;
using UnityEditor; using UnityEditor;
#endif #endif
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public class CompactVector4Attribute : PropertyAttribute { public class CompactVector4Attribute : PropertyAttribute {
public CompactVector4Attribute() { public CompactVector4Attribute() {
} }
@@ -11,7 +11,7 @@ namespace InspectorToolkit {
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
[CustomPropertyDrawer(typeof(CompactVector4Attribute))] [CustomPropertyDrawer(typeof(CompactVector4Attribute))]
public class CompactVector4AttributeDrawer : PropertyDrawer { public class CompactVector4AttributeDrawer : PropertyDrawer {

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit { namespace Jovian.InspectorTools {
/// <summary> /// <summary>
/// Conditionally Show/Hide field in inspector, based on some other field value /// Conditionally Show/Hide field in inspector, based on some other field value
/// </summary> /// </summary>
@@ -26,7 +26,7 @@ namespace InspectorToolkit {
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
using EditorTools; using EditorTools;
using UnityEditor; using UnityEditor;

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
public class ConstantsSelectionAttribute : PropertyAttribute public class ConstantsSelectionAttribute : PropertyAttribute
{ {
@@ -17,7 +17,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using UnityEditor; using UnityEditor;
using EditorTools; using EditorTools;

View File

@@ -2,7 +2,7 @@
using System.Linq; using System.Linq;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
/// <summary> /// <summary>
/// Create Popup with predefined values for string, int or float property /// Create Popup with predefined values for string, int or float property
@@ -19,7 +19,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using UnityEditor; using UnityEditor;

View File

@@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
/// <summary> /// <summary>
/// Use to display inspector of property object /// Use to display inspector of property object
@@ -18,7 +18,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using EditorTools; using EditorTools;
using UnityEditor; using UnityEditor;

View File

@@ -8,7 +8,7 @@
using UnityEngine; using UnityEngine;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
public class FoldoutAttribute : PropertyAttribute public class FoldoutAttribute : PropertyAttribute
{ {
@@ -27,7 +27,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;

View File

@@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public class InfoAttribute : PropertyAttribute { public class InfoAttribute : PropertyAttribute {
public enum MessageType { public enum MessageType {
Info, Info,
@@ -34,7 +34,7 @@ namespace InspectorToolkit {
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
using UnityEditor; using UnityEditor;
[CustomPropertyDrawer(typeof(InfoAttribute))] [CustomPropertyDrawer(typeof(InfoAttribute))]

View File

@@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
/// <summary> /// <summary>
/// Field will be Read-Only in Playmode /// Field will be Read-Only in Playmode
@@ -11,7 +11,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using UnityEditor; using UnityEditor;

View File

@@ -1,7 +1,7 @@
using System; using System;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public class InterfaceComponentAttribute : PropertyAttribute { public class InterfaceComponentAttribute : PropertyAttribute {
public readonly Type interfaceType; public readonly Type interfaceType;
public readonly bool allowMismatch; public readonly bool allowMismatch;
@@ -14,7 +14,7 @@ namespace InspectorToolkit {
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
using UnityEditor; using UnityEditor;
[CustomPropertyDrawer(typeof(InterfaceComponentAttribute))] [CustomPropertyDrawer(typeof(InterfaceComponentAttribute))]

View File

@@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
public class LayerAttribute : PropertyAttribute public class LayerAttribute : PropertyAttribute
{ {
@@ -8,7 +8,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using UnityEditor; using UnityEditor;

View File

@@ -1,7 +1,7 @@
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public class LinkAttribute : PropertyAttribute { public class LinkAttribute : PropertyAttribute {
public readonly string message; public readonly string message;
@@ -15,7 +15,7 @@ namespace InspectorToolkit {
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
[CustomPropertyDrawer(typeof(LinkAttribute))] [CustomPropertyDrawer(typeof(LinkAttribute))]
public class LinkAttributeDrawer : PropertyDrawer { public class LinkAttributeDrawer : PropertyDrawer {

View File

@@ -1,12 +1,12 @@
using InspectorToolkit.Internal; using Jovian.InspectorTools.Internal;
using UnityEngine; using UnityEngine;
#if UNITY_EDITOR #if UNITY_EDITOR
using UnityEditor; using UnityEditor;
using InspectorToolkit.EditorTools; using Jovian.InspectorTools.EditorTools;
#endif #endif
#pragma warning disable 0414 #pragma warning disable 0414
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
public class MaxValueAttribute : AttributeBase public class MaxValueAttribute : AttributeBase
{ {

View File

@@ -6,7 +6,7 @@
using System; using System;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public class MinMaxRangeAttribute : PropertyAttribute { public class MinMaxRangeAttribute : PropertyAttribute {
public MinMaxRangeAttribute(float min, float max) { public MinMaxRangeAttribute(float min, float max) {
Min = min; Min = min;
@@ -59,7 +59,7 @@ namespace InspectorToolkit {
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
using UnityEditor; using UnityEditor;
[CustomPropertyDrawer(typeof(MinMaxRangeAttribute))] [CustomPropertyDrawer(typeof(MinMaxRangeAttribute))]

View File

@@ -1,12 +1,12 @@
using InspectorToolkit.Internal; using Jovian.InspectorTools.Internal;
using UnityEngine; using UnityEngine;
#if UNITY_EDITOR #if UNITY_EDITOR
using UnityEditor; using UnityEditor;
using InspectorToolkit.EditorTools; using Jovian.InspectorTools.EditorTools;
#endif #endif
#pragma warning disable 0414 #pragma warning disable 0414
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
public class MinValueAttribute : AttributeBase public class MinValueAttribute : AttributeBase
{ {

View File

@@ -5,7 +5,7 @@ using System.Linq;
using Jovian.Utilities; using Jovian.Utilities;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
/// <summary> /// <summary>
/// Finds all objects in the project of 'objectType' then creates a dropdown showing all values matching 'memberName' /// 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 #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using UnityEditor; using UnityEditor;
using System.Reflection; using System.Reflection;

View File

@@ -2,7 +2,7 @@ using System.Reflection;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public class OnValueChangedAttribute : PropertyAttribute { public class OnValueChangedAttribute : PropertyAttribute {
public readonly string methodName; public readonly string methodName;
public OnValueChangedAttribute(string methodName) { public OnValueChangedAttribute(string methodName) {
@@ -12,7 +12,7 @@ namespace InspectorToolkit {
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
[CustomPropertyDrawer(typeof(OnValueChangedAttribute))] [CustomPropertyDrawer(typeof(OnValueChangedAttribute))]
public class OnValueChangedAttributeDrawer : PropertyDrawer { public class OnValueChangedAttributeDrawer : PropertyDrawer {

View File

@@ -1,12 +1,12 @@
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public class OptionalAttribute : PropertyAttribute { } public class OptionalAttribute : PropertyAttribute { }
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
[CustomPropertyDrawer(typeof(OptionalAttribute))] [CustomPropertyDrawer(typeof(OptionalAttribute))]
public class OptionalAttributePropertyDrawer : PropertyDrawer { public class OptionalAttributePropertyDrawer : PropertyDrawer {

View File

@@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
public class OverrideLabelAttribute : PropertyAttribute public class OverrideLabelAttribute : PropertyAttribute
{ {
@@ -11,7 +11,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using UnityEditor; using UnityEditor;

View File

@@ -7,7 +7,7 @@
using UnityEngine; using UnityEngine;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
public class PositiveValueOnlyAttribute : PropertyAttribute public class PositiveValueOnlyAttribute : PropertyAttribute
{ {
@@ -15,7 +15,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using UnityEditor; using UnityEditor;
using EditorTools; using EditorTools;

View File

@@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
public class ReadOnlyAttribute : ConditionalFieldAttribute public class ReadOnlyAttribute : ConditionalFieldAttribute
{ {
@@ -15,7 +15,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using UnityEditor; using UnityEditor;

View File

@@ -1,7 +1,7 @@
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
/// <summary> /// <summary>
/// Validate a string field by regex expression /// Validate a string field by regex expression
@@ -42,7 +42,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using UnityEditor; using UnityEditor;
using EditorTools; using EditorTools;

View File

@@ -1,12 +1,12 @@
using System; using System;
using InspectorToolkit.Internal; using Jovian.InspectorTools.Internal;
using Jovian.Utilities.Editor; using Jovian.Utilities.Editor;
using UnityEngine; using UnityEngine;
#if UNITY_EDITOR #if UNITY_EDITOR
using UnityEditor; using UnityEditor;
#endif #endif
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public class RequireArraySizeAttribute : ArrayAttribute, IPropertyCondition { public class RequireArraySizeAttribute : ArrayAttribute, IPropertyCondition {
public readonly int size; public readonly int size;

View File

@@ -1,6 +1,6 @@
using System; using System;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
[AttributeUsage(AttributeTargets.Class)] [AttributeUsage(AttributeTargets.Class)]
public class RequireLayerAttribute : Attribute public class RequireLayerAttribute : Attribute

View File

@@ -1,5 +1,5 @@
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;

View File

@@ -3,10 +3,10 @@ using UnityEngine;
#if UNITY_EDITOR #if UNITY_EDITOR
using System.Reflection; using System.Reflection;
using UnityEditor; using UnityEditor;
using InspectorToolkit.EditorTools; using Jovian.InspectorTools.EditorTools;
#endif #endif
namespace InspectorToolkit { namespace Jovian.InspectorTools {
/// <summary> /// <summary>
/// Does not work on objects with children - will break their UI /// Does not work on objects with children - will break their UI
/// </summary> /// </summary>
@@ -55,7 +55,7 @@ namespace InspectorToolkit {
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
[CustomPropertyDrawer(typeof(RequireMethodAttribute))] [CustomPropertyDrawer(typeof(RequireMethodAttribute))]
public class RequireMethodAttributePropertyDrawer : PropertyDrawer { public class RequireMethodAttributePropertyDrawer : PropertyDrawer {

View File

@@ -1,6 +1,6 @@
using System; using System;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
[AttributeUsage(AttributeTargets.Class)] [AttributeUsage(AttributeTargets.Class)]
public class RequireTagAttribute : Attribute public class RequireTagAttribute : Attribute

View File

@@ -7,7 +7,7 @@ using UnityEditor;
using UnityEditor.SceneManagement; using UnityEditor.SceneManagement;
#endif #endif
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public class RequiredAttribute : PropertyAttribute, IPropertyCondition { public class RequiredAttribute : PropertyAttribute, IPropertyCondition {
public enum Scope { public enum Scope {
@@ -239,7 +239,7 @@ namespace InspectorToolkit {
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
[CustomPropertyDrawer(typeof(RequiredAttribute))] [CustomPropertyDrawer(typeof(RequiredAttribute))]
public class RequiredAttributePropertyDrawer : PropertyDrawer { public class RequiredAttributePropertyDrawer : PropertyDrawer {

View File

@@ -7,7 +7,7 @@ using System;
using System.Linq; using System.Linq;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
/// <summary> /// <summary>
/// Used to pick scene from inspector. /// Used to pick scene from inspector.
@@ -20,7 +20,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using UnityEditor; using UnityEditor;

View File

@@ -12,7 +12,7 @@ using UnityEngine;
using UnityEditor; using UnityEditor;
#endif #endif
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
/// <summary> /// <summary>
/// Put this attribute on a public (or SerializeField) enum in a /// Put this attribute on a public (or SerializeField) enum in a
@@ -26,7 +26,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
/// <summary> /// <summary>
/// Draws the custom enum selector popup for enum fields using the /// Draws the custom enum selector popup for enum fields using the

View File

@@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
public class SeparatorAttribute : PropertyAttribute public class SeparatorAttribute : PropertyAttribute
{ {
@@ -22,7 +22,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
using UnityEditor; using UnityEditor;

View File

@@ -10,7 +10,7 @@ using Jovian.Utilities;
using UnityObject = UnityEngine.Object; using UnityObject = UnityEngine.Object;
#endif #endif
namespace InspectorToolkit { namespace Jovian.InspectorTools {
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
public class ShowInInspectorAttribute : PropertyAttribute { public class ShowInInspectorAttribute : PropertyAttribute {
public readonly PlayModeVisibility Visibility; public readonly PlayModeVisibility Visibility;
@@ -29,7 +29,7 @@ namespace InspectorToolkit {
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
public class ShowInInspectorAttributeHandler { public class ShowInInspectorAttributeHandler {
private const int MAX_DEPTH = 10; private const int MAX_DEPTH = 10;

View File

@@ -10,7 +10,7 @@ using UnityEngine;
using UnityEditor; using UnityEditor;
#endif #endif
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
public class SpriteLayerAttribute : PropertyAttribute public class SpriteLayerAttribute : PropertyAttribute
{ {
@@ -18,7 +18,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
[CustomPropertyDrawer(typeof(SpriteLayerAttribute))] [CustomPropertyDrawer(typeof(SpriteLayerAttribute))]
public class SpriteLayerAttributeDrawer : PropertyDrawer public class SpriteLayerAttributeDrawer : PropertyDrawer

View File

@@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public class SuffixAttribute : PropertyAttribute { public class SuffixAttribute : PropertyAttribute {
public readonly string suffix; public readonly string suffix;
@@ -9,7 +9,7 @@ namespace InspectorToolkit {
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
using UnityEditor; using UnityEditor;
[CustomPropertyDrawer(typeof(SuffixAttribute))] [CustomPropertyDrawer(typeof(SuffixAttribute))]

View File

@@ -10,7 +10,7 @@ using UnityEngine;
using UnityEditor; using UnityEditor;
#endif #endif
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
public class TagAttribute : PropertyAttribute public class TagAttribute : PropertyAttribute
{ {
@@ -18,7 +18,7 @@ namespace InspectorToolkit
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal namespace Jovian.InspectorTools.Internal
{ {
[CustomPropertyDrawer(typeof(TagAttribute))] [CustomPropertyDrawer(typeof(TagAttribute))]
public class TagAttributeDrawer : PropertyDrawer public class TagAttributeDrawer : PropertyDrawer

View File

@@ -3,7 +3,7 @@ using UnityEngine;
using UnityEditor; using UnityEditor;
#endif #endif
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public class UniformVector3Attribute : PropertyAttribute { public class UniformVector3Attribute : PropertyAttribute {
public UniformVector3Attribute() { public UniformVector3Attribute() {
} }
@@ -11,7 +11,7 @@ namespace InspectorToolkit {
} }
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
[CustomPropertyDrawer(typeof(UniformVector3Attribute))] [CustomPropertyDrawer(typeof(UniformVector3Attribute))]
public class UniformVector3AttributeDrawer : PropertyDrawer { public class UniformVector3AttributeDrawer : PropertyDrawer {

View File

@@ -7,7 +7,7 @@ using UnityEditor;
using UnityEngine; using UnityEngine;
using Object = UnityEngine.Object; using Object = UnityEngine.Object;
namespace InspectorToolkit.EditorTools { namespace Jovian.InspectorTools.EditorTools {
public static class MyGUI { public static class MyGUI {
#region Colors #region Colors

View File

@@ -7,7 +7,7 @@ using System.Reflection;
using UnityEditor; using UnityEditor;
using Object = UnityEngine.Object; using Object = UnityEngine.Object;
namespace InspectorToolkit.EditorTools { namespace Jovian.InspectorTools.EditorTools {
public static class MySerializedProperty { public static class MySerializedProperty {
#region Collections Handling #region Collections Handling

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public static class MyCollections { public static class MyCollections {
/// <summary> /// <summary>
/// Returns new array with inserted empty element at index /// Returns new array with inserted empty element at index

View File

@@ -1,7 +1,7 @@
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
namespace InspectorToolkit namespace Jovian.InspectorTools
{ {
public static class MyRegex public static class MyRegex
{ {

View File

@@ -8,7 +8,7 @@ using UnityEditor;
using UnityEngine; using UnityEngine;
using Object = UnityEngine.Object; using Object = UnityEngine.Object;
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public static class AutoFindUtil { public static class AutoFindUtil {
public static void Search(AutoFindAttribute autoFindAttribute, SerializedProperty property, bool autoAddIfMissing = false) { public static void Search(AutoFindAttribute autoFindAttribute, SerializedProperty property, bool autoAddIfMissing = false) {
Type propertyType = EditorSerializationUtility.GetTypeFromProperty(property); Type propertyType = EditorSerializationUtility.GetTypeFromProperty(property);

View File

@@ -2,7 +2,7 @@
using UnityEditor; using UnityEditor;
#endif #endif
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public interface IActionableAttribute { public interface IActionableAttribute {
#if UNITY_EDITOR #if UNITY_EDITOR
void Trigger(SerializedProperty serializedProperty); void Trigger(SerializedProperty serializedProperty);

View File

@@ -2,7 +2,7 @@
using UnityEditor; using UnityEditor;
#endif #endif
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public interface IPropertyCondition { public interface IPropertyCondition {
#if UNITY_EDITOR #if UNITY_EDITOR
bool DoesPropertyMeetCondition(SerializedProperty property, out string description); bool DoesPropertyMeetCondition(SerializedProperty property, out string description);

View File

@@ -2,7 +2,7 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
namespace InspectorToolkit { namespace Jovian.InspectorTools {
public enum PlayModeVisibility { public enum PlayModeVisibility {
Always, Always,
EditMode, EditMode,

View File

@@ -2,7 +2,7 @@
using UnityEngine; using UnityEngine;
#if UNITY_EDITOR #if UNITY_EDITOR
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
public interface IGUILayoutPropertyField { public interface IGUILayoutPropertyField {
void GUILayoutPropertyField(SerializedProperty serializedProperty, params GUILayoutOption[] options); void GUILayoutPropertyField(SerializedProperty serializedProperty, params GUILayoutOption[] options);

View File

@@ -3,7 +3,7 @@ using UnityEngine;
#if UNITY_EDITOR #if UNITY_EDITOR
using UnityEditor; using UnityEditor;
namespace InspectorToolkit.Internal { namespace Jovian.InspectorTools.Internal {
public static class RequiredUtil { public static class RequiredUtil {
private const float ICON_X_OFFSET = 15f; private const float ICON_X_OFFSET = 15f;