First commit for private source control. Older commits available on Github.

This commit is contained in:
2026-03-26 12:52:52 +00:00
parent a04c602626
commit 2d449c4a17
2176 changed files with 408185 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class BoxGroupAttribute : MetaAttribute, IGroupAttribute
{
public string Name { get; private set; }
public BoxGroupAttribute(string name = "")
{
Name = name;
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 07da8af1e3be52c4789678bf4138ae11
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 129996
packageName: NaughtyAttributes
packageVersion: 2.1.4
assetPath: Assets/NaughtyAttributes/Scripts/Core/MetaAttributes/BoxGroupAttribute.cs
uploadId: 480834

View File

@@ -0,0 +1,26 @@
using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class DisableIfAttribute : EnableIfAttributeBase
{
public DisableIfAttribute(string condition)
: base(condition)
{
Inverted = true;
}
public DisableIfAttribute(EConditionOperator conditionOperator, params string[] conditions)
: base(conditionOperator, conditions)
{
Inverted = true;
}
public DisableIfAttribute(string enumName, object enumValue)
: base(enumName, enumValue as Enum)
{
Inverted = true;
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 52a0d5c249ac8fd42a4fb4d61bc2f797
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 129996
packageName: NaughtyAttributes
packageVersion: 2.1.4
assetPath: Assets/NaughtyAttributes/Scripts/Core/MetaAttributes/DisableIfAttribute.cs
uploadId: 480834

View File

@@ -0,0 +1,26 @@
using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class EnableIfAttribute : EnableIfAttributeBase
{
public EnableIfAttribute(string condition)
: base(condition)
{
Inverted = false;
}
public EnableIfAttribute(EConditionOperator conditionOperator, params string[] conditions)
: base(conditionOperator, conditions)
{
Inverted = false;
}
public EnableIfAttribute(string enumName, object enumValue)
: base(enumName, enumValue as Enum)
{
Inverted = false;
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: a616ae826c8ebae45a89d6a8cb68a843
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 129996
packageName: NaughtyAttributes
packageVersion: 2.1.4
assetPath: Assets/NaughtyAttributes/Scripts/Core/MetaAttributes/EnableIfAttribute.cs
uploadId: 480834

View File

@@ -0,0 +1,39 @@
using System;
namespace NaughtyAttributes
{
public abstract class EnableIfAttributeBase : MetaAttribute
{
public string[] Conditions { get; private set; }
public EConditionOperator ConditionOperator { get; private set; }
public bool Inverted { get; protected set; }
/// <summary>
/// If this not null, <see cref="Conditions"/>[0] is name of an enum variable.
/// </summary>
public Enum EnumValue { get; private set; }
public EnableIfAttributeBase(string condition)
{
ConditionOperator = EConditionOperator.And;
Conditions = new string[1] { condition };
}
public EnableIfAttributeBase(EConditionOperator conditionOperator, params string[] conditions)
{
ConditionOperator = conditionOperator;
Conditions = conditions;
}
public EnableIfAttributeBase(string enumName, Enum enumValue)
: this(enumName)
{
if (enumValue == null)
{
throw new ArgumentNullException(nameof(enumValue), "This parameter must be an enum value.");
}
EnumValue = enumValue;
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 8ba6385cd022e164b89ead1937173ddc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 129996
packageName: NaughtyAttributes
packageVersion: 2.1.4
assetPath: Assets/NaughtyAttributes/Scripts/Core/MetaAttributes/EnableIfAttributeBase.cs
uploadId: 480834

View File

@@ -0,0 +1,15 @@
using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class FoldoutAttribute : MetaAttribute, IGroupAttribute
{
public string Name { get; private set; }
public FoldoutAttribute(string name)
{
Name = name;
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 95f184555d5079243b2d25b35a641a74
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 129996
packageName: NaughtyAttributes
packageVersion: 2.1.4
assetPath: Assets/NaughtyAttributes/Scripts/Core/MetaAttributes/FoldoutAttribute.cs
uploadId: 480834

View File

@@ -0,0 +1,26 @@
using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class HideIfAttribute : ShowIfAttributeBase
{
public HideIfAttribute(string condition)
: base(condition)
{
Inverted = true;
}
public HideIfAttribute(EConditionOperator conditionOperator, params string[] conditions)
: base(conditionOperator, conditions)
{
Inverted = true;
}
public HideIfAttribute(string enumName, object enumValue)
: base(enumName, enumValue as Enum)
{
Inverted = true;
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 9ab2d0fcfb13a214ea6ef7629c96a761
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 129996
packageName: NaughtyAttributes
packageVersion: 2.1.4
assetPath: Assets/NaughtyAttributes/Scripts/Core/MetaAttributes/HideIfAttribute.cs
uploadId: 480834

View File

@@ -0,0 +1,8 @@
using UnityEngine;
namespace NaughtyAttributes
{
public interface IGroupAttribute
{
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 7c437b9ac50575347a7b12520f37f9a2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 129996
packageName: NaughtyAttributes
packageVersion: 2.1.4
assetPath: Assets/NaughtyAttributes/Scripts/Core/MetaAttributes/IGroupAttribute.cs
uploadId: 480834

View File

@@ -0,0 +1,15 @@
using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class LabelAttribute : MetaAttribute
{
public string Label { get; private set; }
public LabelAttribute(string label)
{
Label = label;
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 79e0e0c0a7c25ea4fbe8eecaa4d559a0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 129996
packageName: NaughtyAttributes
packageVersion: 2.1.4
assetPath: Assets/NaughtyAttributes/Scripts/Core/MetaAttributes/LabelAttribute.cs
uploadId: 480834

View File

@@ -0,0 +1,8 @@
using System;
namespace NaughtyAttributes
{
public class MetaAttribute : Attribute, INaughtyAttribute
{
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: a482b4e0fbf0f4547a5d522182a68d24
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 129996
packageName: NaughtyAttributes
packageVersion: 2.1.4
assetPath: Assets/NaughtyAttributes/Scripts/Core/MetaAttributes/MetaAttribute.cs
uploadId: 480834

View File

@@ -0,0 +1,15 @@
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)
{
CallbackName = callbackName;
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: e16a27c5576022b4bbe997c7db9051f0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 129996
packageName: NaughtyAttributes
packageVersion: 2.1.4
assetPath: Assets/NaughtyAttributes/Scripts/Core/MetaAttributes/OnValueChangedAttribute.cs
uploadId: 480834

View File

@@ -0,0 +1,10 @@
using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class ReadOnlyAttribute : MetaAttribute
{
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: e57264747ba93b94fbff12733de29499
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 129996
packageName: NaughtyAttributes
packageVersion: 2.1.4
assetPath: Assets/NaughtyAttributes/Scripts/Core/MetaAttributes/ReadOnlyAttribute.cs
uploadId: 480834

View File

@@ -0,0 +1,26 @@
using System;
namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class ShowIfAttribute : ShowIfAttributeBase
{
public ShowIfAttribute(string condition)
: base(condition)
{
Inverted = false;
}
public ShowIfAttribute(EConditionOperator conditionOperator, params string[] conditions)
: base(conditionOperator, conditions)
{
Inverted = false;
}
public ShowIfAttribute(string enumName, object enumValue)
: base(enumName, enumValue as Enum)
{
Inverted = false;
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 1ada427cfd2c9b04989d6d18dea27985
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 129996
packageName: NaughtyAttributes
packageVersion: 2.1.4
assetPath: Assets/NaughtyAttributes/Scripts/Core/MetaAttributes/ShowIfAttribute.cs
uploadId: 480834

View File

@@ -0,0 +1,39 @@
using System;
namespace NaughtyAttributes
{
public class ShowIfAttributeBase : MetaAttribute
{
public string[] Conditions { get; private set; }
public EConditionOperator ConditionOperator { get; private set; }
public bool Inverted { get; protected set; }
/// <summary>
/// If this not null, <see cref="Conditions"/>[0] is name of an enum variable.
/// </summary>
public Enum EnumValue { get; private set; }
public ShowIfAttributeBase(string condition)
{
ConditionOperator = EConditionOperator.And;
Conditions = new string[1] { condition };
}
public ShowIfAttributeBase(EConditionOperator conditionOperator, params string[] conditions)
{
ConditionOperator = conditionOperator;
Conditions = conditions;
}
public ShowIfAttributeBase(string enumName, Enum enumValue)
: this(enumName)
{
if (enumValue == null)
{
throw new ArgumentNullException(nameof(enumValue), "This parameter must be an enum value.");
}
EnumValue = enumValue;
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 0532b1c4d8a9ccf4b9f98f0bbe4a6747
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 129996
packageName: NaughtyAttributes
packageVersion: 2.1.4
assetPath: Assets/NaughtyAttributes/Scripts/Core/MetaAttributes/ShowIfAttributeBase.cs
uploadId: 480834