Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
6037664
Added short, ushort, uint, ulong support for ShowNativeProperty and S…
StromKuo Sep 15, 2020
464297d
[Foldout] is now supported by Unity version below 2019.1
dbrizov Oct 10, 2020
95a8646
Package version updated to 2.0.7
dbrizov Oct 10, 2020
e208513
CI GitHub action update
dbrizov Nov 2, 2020
7a671e3
CI test
dbrizov Nov 2, 2020
6610c4b
CI test 2
dbrizov Nov 2, 2020
09a8e23
Fixed Incorrect Rendering of Custom Property Drawers in ReorderableLi…
peeweek Nov 12, 2020
d2d5960
Foldout group can now be expanded when you click on the label
dbrizov Dec 22, 2020
310f597
Button and ReorderableList + Label support rich text
dbrizov Jan 11, 2021
82278ba
#200 - fixed a nesting bug where some elements were overlapping
dbrizov Jan 11, 2021
fc45699
Update package version: 2.0.7 => 2.0.8
dbrizov Jan 11, 2021
5216320
Merge remote-tracking branch 'remotes/upstream/master'
StromKuo Jan 28, 2021
1cc5fd6
Added support for Vector2Int
Roytazz Mar 17, 2021
d418e20
Added support for Vector and VectorInt for MinValue and MaxValue
drachenkurve Mar 22, 2021
ec090ff
Add constructors
IF-ACT Apr 10, 2021
f231ea3
Add tests for EnableIf and DisableIf
IF-ACT Apr 10, 2021
4dc647a
Make EnableIf and DisableIf tests work
IF-ACT Apr 10, 2021
6bae87e
Add constructors for ShowIf and HideIf
IF-ACT Apr 10, 2021
055ba52
Add tests for ShowIf and HideIf
IF-ACT Apr 10, 2021
dc41121
Make ShowIf and HideIf tests work
IF-ACT Apr 10, 2021
67ae0d2
Fix wrong tests
IF-ACT Apr 10, 2021
21a74a6
#180 - ReadOnly attribute is now a meta attribute so that it can be c…
dbrizov Apr 24, 2021
3c35a74
#213 - fixed a bug where Dropdown doesn't save first value by default
dbrizov Apr 24, 2021
b816698
#209 - fixed a bug where multi-selection of objects with a dropdown o…
dbrizov Apr 24, 2021
57f5dd2
fixed a bug where the labels of nested curves when using the [CurveRa…
dbrizov Apr 24, 2021
44a0fc3
#215 - implemented Layer attribute
dbrizov Apr 24, 2021
e8c272f
#222 - fixed a bug where ProgressBar wasn't working with integers
dbrizov Apr 25, 2021
a22aa7e
#207 - fixed a bug where Decorator Drawers are not affected by ShowIf…
dbrizov Apr 25, 2021
15f9c5c
#185 - fixed a bug where scriptable objects with the Expandable attri…
dbrizov Apr 25, 2021
8905eed
non-serialized fields or properties now support Vector2Int, Vector3In…
dbrizov Apr 25, 2021
264f82b
Merge branch 'v2' of https://github.com/dragon-kurve/NaughtyAttribute…
dbrizov Apr 25, 2021
e8a9514
Merge branch 'master' of https://github.com/StromKuo/NaughtyAttribute…
dbrizov Apr 25, 2021
4a80b7f
Some reformatting to ensure coding standard
dbrizov Apr 25, 2021
b4f0376
Merge branch 'minmaxslider' of https://github.com/Roytazz/NaughtyAttr…
dbrizov Apr 25, 2021
2db5e79
Added test for MinMaxSlider with a Vector2Int field
dbrizov Apr 25, 2021
8e23635
Merge branch '#167-enum-support' of https://github.com/IF-ACT/Naughty…
dbrizov Apr 25, 2021
84c985c
Some refactoring to ensure coding standard
dbrizov Apr 25, 2021
ca67285
Updating documentation and package version
dbrizov Apr 25, 2021
9f238ae
Create test for inherited private validator function
IF-ACT Apr 26, 2021
7977788
Make test work
IF-ACT Apr 26, 2021
c6534d5
Move duplicated code into function `SelfAndBaseTypes`
IF-ACT Apr 26, 2021
70131d4
Some refactoring
dbrizov Apr 26, 2021
47c86c1
Create tests
IF-ACT Apr 28, 2021
f634b83
Make test work
IF-ACT Apr 28, 2021
c43ff11
#232 - fixed a bug where expandable is not working for a list of scri…
dbrizov May 2, 2021
584fa1f
Merge branch '#217-support-enum-flags' of https://github.com/IF-ACT/N…
dbrizov May 2, 2021
04df0b1
Some refactoring
dbrizov May 2, 2021
bf09948
Package version update 2.0.9 => 2.1.0
dbrizov May 2, 2021
375f53c
Fix issue with null errors on first adding a dropdown (before seriali…
Aug 20, 2021
9d1d2e5
package.json update
dbrizov Oct 9, 2021
6ff4276
#277 - Fixed a bug where expandable wasn't working correctly when use…
dbrizov Oct 9, 2021
7fef240
Implemented SortingLayer attribute
purejenix Nov 11, 2021
51a199a
Fixed namespace of CurveRangeTest.cs
dbrizov Nov 20, 2021
7cc3bb3
Reproduce #294
rhys-vdw Jan 4, 2022
7480bf6
Do not call Update on Expandable serializedObject
rhys-vdw Jan 4, 2022
601c4ee
Curve Range for Arrays/List
AtaTrkgl Feb 3, 2022
9036c45
Merge branch '294-fields-preceding-expandable-are-not-editable' of ht…
dbrizov Feb 6, 2022
edcd559
Updated package version
dbrizov Feb 6, 2022
bf34311
#279 [ShowNonSerializedField] and [ShowNativeProperty] now use Unity'…
dbrizov Feb 6, 2022
d8306c1
Merge branch 'master' of https://github.com/AtaTrkgl/NaughtyAttribute…
dbrizov Feb 6, 2022
11559e3
Some refactoring
dbrizov Feb 6, 2022
99ff00f
Updated package version to 2.1.3
dbrizov Feb 6, 2022
b25f8ae
Replaced tabs with spaces
dbrizov Feb 12, 2022
c608556
Merge branch 'feature/sorting-layer-attribute' of https://github.com/…
dbrizov Feb 12, 2022
131a48f
Refactoring
dbrizov Feb 12, 2022
79cac4c
Update documentation
dbrizov Feb 12, 2022
de74738
Update package version 2.1.3 => 2.1.4
dbrizov Feb 12, 2022
8a8fa5a
Update DemoScene
dbrizov Feb 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Documentation~/Layer_Inspector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documentation~/SortingLayer_Inspector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
359 changes: 333 additions & 26 deletions Samples/DemoScene/DemoScene.unity

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions Samples/DemoScene/TestAssets/NaughtyScriptableObject.asset
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 753bdb918c6038142acddbd7aae6958f, type: 3}
m_Name: NaughtyScriptableObject
m_EditorClassIdentifier:
enableMyInt: 0
showMyFloat: 1
myInt: 0
myFloat: 1
mySlider: {x: 0.25, y: 0.75}
list: 010000000200000003000000
listA:
- {fileID: 11400000, guid: 149474eb879a6a641b560ca17d48712f, type: 2}
- {fileID: 11400000, guid: 149474eb879a6a641b560ca17d48712f, type: 2}
17 changes: 17 additions & 0 deletions Samples/DemoScene/TestAssets/TestScriptableObjectA.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 19472ac11eae27a4b804f354ca7d9c00, type: 3}
m_Name: TestScriptableObjectA
m_EditorClassIdentifier:
listB:
- {fileID: 11400000, guid: 05371aa7630d3ef44ac0106af06cd73c, type: 2}
- {fileID: 11400000, guid: 05371aa7630d3ef44ac0106af06cd73c, type: 2}
8 changes: 8 additions & 0 deletions Samples/DemoScene/TestAssets/TestScriptableObjectA.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions Samples/DemoScene/TestAssets/TestScriptableObjectB.asset
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c2b396aeebc9d984da298eee313896bc, type: 3}
m_Name: TestScriptableObjectB
m_EditorClassIdentifier:
slider: {x: 3, y: 7}
8 changes: 8 additions & 0 deletions Samples/DemoScene/TestAssets/TestScriptableObjectB.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Scripts/Core/DrawerAttributes/AllowNestingAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class AllowNestingAttribute : DrawerAttribute
{
}
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class AllowNestingAttribute : DrawerAttribute
{
}
}
32 changes: 16 additions & 16 deletions Scripts/Core/DrawerAttributes/AnimatorParamAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@

namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class AnimatorParamAttribute : DrawerAttribute
{
public string AnimatorName { get; private set; }
public AnimatorControllerParameterType? AnimatorParamType { get; private set; }
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class AnimatorParamAttribute : DrawerAttribute
{
public string AnimatorName { get; private set; }
public AnimatorControllerParameterType? AnimatorParamType { get; private set; }

public AnimatorParamAttribute(string animatorName)
{
AnimatorName = animatorName;
AnimatorParamType = null;
}
public AnimatorParamAttribute(string animatorName)
{
AnimatorName = animatorName;
AnimatorParamType = null;
}

public AnimatorParamAttribute(string animatorName, AnimatorControllerParameterType animatorParamType)
{
AnimatorName = animatorName;
AnimatorParamType = animatorParamType;
}
}
public AnimatorParamAttribute(string animatorName, AnimatorControllerParameterType animatorParamType)
{
AnimatorName = animatorName;
AnimatorParamType = animatorParamType;
}
}
}
42 changes: 21 additions & 21 deletions Scripts/Core/DrawerAttributes/CurveRangeAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@

namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class CurveRangeAttribute : DrawerAttribute
{
public Vector2 Min { get; private set; }
public Vector2 Max { get; private set; }
public EColor Color { get; private set; }
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class CurveRangeAttribute : DrawerAttribute
{
public Vector2 Min { get; private set; }
public Vector2 Max { get; private set; }
public EColor Color { get; private set; }

public CurveRangeAttribute(Vector2 min, Vector2 max, EColor color = EColor.Clear)
{
Min = min;
Max = max;
Color = color;
}
public CurveRangeAttribute(Vector2 min, Vector2 max, EColor color = EColor.Clear)
{
Min = min;
Max = max;
Color = color;
}

public CurveRangeAttribute(EColor color)
: this(Vector2.zero, Vector2.one, color)
{
}
public CurveRangeAttribute(EColor color)
: this(Vector2.zero, Vector2.one, color)
{
}

public CurveRangeAttribute(float minX, float minY, float maxX, float maxY, EColor color = EColor.Clear)
: this(new Vector2(minX, minY), new Vector2(maxX, maxY), color)
{
}
}
public CurveRangeAttribute(float minX, float minY, float maxX, float maxY, EColor color = EColor.Clear)
: this(new Vector2(minX, minY), new Vector2(maxX, maxY), color)
{
}
}
}
12 changes: 6 additions & 6 deletions Scripts/Core/DrawerAttributes/DrawerAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace NaughtyAttributes
{
/// <summary>
/// Base class for all drawer attributes
/// </summary>
public class DrawerAttribute : PropertyAttribute, INaughtyAttribute
{
}
/// <summary>
/// Base class for all drawer attributes
/// </summary>
public class DrawerAttribute : PropertyAttribute, INaughtyAttribute
{
}
}
100 changes: 50 additions & 50 deletions Scripts/Core/DrawerAttributes/DropdownAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,54 @@

namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class DropdownAttribute : DrawerAttribute
{
public string ValuesName { get; private set; }

public DropdownAttribute(string valuesName)
{
ValuesName = valuesName;
}
}

public interface IDropdownList : IEnumerable<KeyValuePair<string, object>>
{
}

public class DropdownList<T> : IDropdownList
{
private List<KeyValuePair<string, object>> _values;

public DropdownList()
{
_values = new List<KeyValuePair<string, object>>();
}

public void Add(string displayName, T value)
{
_values.Add(new KeyValuePair<string, object>(displayName, value));
}

public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
{
return _values.GetEnumerator();
}

IEnumerator IEnumerable.GetEnumerator()
{
return 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;
}
}
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class DropdownAttribute : DrawerAttribute
{
public string ValuesName { get; private set; }

public DropdownAttribute(string valuesName)
{
ValuesName = valuesName;
}
}

public interface IDropdownList : IEnumerable<KeyValuePair<string, object>>
{
}

public class DropdownList<T> : IDropdownList
{
private List<KeyValuePair<string, object>> _values;

public DropdownList()
{
_values = new List<KeyValuePair<string, object>>();
}

public void Add(string displayName, T value)
{
_values.Add(new KeyValuePair<string, object>(displayName, value));
}

public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
{
return _values.GetEnumerator();
}

IEnumerator IEnumerable.GetEnumerator()
{
return 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;
}
}
}
8 changes: 4 additions & 4 deletions Scripts/Core/DrawerAttributes/EnumFlagsAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class EnumFlagsAttribute : DrawerAttribute
{
}
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class EnumFlagsAttribute : DrawerAttribute
{
}
}
8 changes: 4 additions & 4 deletions Scripts/Core/DrawerAttributes/Expandable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class ExpandableAttribute : DrawerAttribute
{
}
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class ExpandableAttribute : DrawerAttribute
{
}
}
26 changes: 13 additions & 13 deletions Scripts/Core/DrawerAttributes/HorizontalLineAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

namespace NaughtyAttributes
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true, Inherited = true)]
public class HorizontalLineAttribute : DrawerAttribute
{
public const float DefaultHeight = 2.0f;
public const EColor DefaultColor = EColor.Gray;
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true, Inherited = true)]
public class HorizontalLineAttribute : DrawerAttribute
{
public const float DefaultHeight = 2.0f;
public const EColor DefaultColor = EColor.Gray;

public float Height { get; private set; }
public EColor Color { get; private set; }
public float Height { get; private set; }
public EColor Color { get; private set; }

public HorizontalLineAttribute(float height = DefaultHeight, EColor color = DefaultColor)
{
Height = height;
Color = color;
}
}
public HorizontalLineAttribute(float height = DefaultHeight, EColor color = DefaultColor)
{
Height = height;
Color = color;
}
}
}
34 changes: 17 additions & 17 deletions Scripts/Core/DrawerAttributes/InfoBoxAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

namespace NaughtyAttributes
{
public enum EInfoBoxType
{
Normal,
Warning,
Error
}
public enum EInfoBoxType
{
Normal,
Warning,
Error
}

[AttributeUsage(AttributeTargets.Field, AllowMultiple = true, Inherited = true)]
public class InfoBoxAttribute : DrawerAttribute
{
public string Text { get; private set; }
public EInfoBoxType Type { get; private set; }
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true, Inherited = true)]
public class InfoBoxAttribute : DrawerAttribute
{
public string Text { get; private set; }
public EInfoBoxType Type { get; private set; }

public InfoBoxAttribute(string text, EInfoBoxType type = EInfoBoxType.Normal)
{
Text = text;
Type = type;
}
}
public InfoBoxAttribute(string text, EInfoBoxType type = EInfoBoxType.Normal)
{
Text = text;
Type = type;
}
}
}
Loading