com.wallstop-studios.unity-helpers 2.0.0-rc75.8 → 2.0.0-rc76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor/CustomDrawers/IntDropdownDrawer.cs +46 -0
- package/Editor/CustomDrawers/IntDropdownDrawer.cs.meta +3 -0
- package/Editor/{StringInListeDrawer.cs → CustomDrawers/StringInListeDrawer.cs} +2 -2
- package/Editor/{WShowIfPropertyDrawer.cs → CustomDrawers/WShowIfPropertyDrawer.cs} +3 -3
- package/Editor/CustomDrawers.meta +3 -0
- package/Editor/Sprites/AnimationViewerWindow.cs +1521 -0
- package/Editor/Sprites/AnimationViewerWindow.cs.meta +3 -0
- package/Editor/Sprites/ProjectAnimationSettings.cs +50 -0
- package/Editor/Sprites/ProjectAnimationSettings.cs.meta +3 -0
- package/Editor/Sprites/ScriptableSpriteAtlas.cs +4 -2
- package/Editor/Sprites/SpriteSettingsApplier.cs +6 -0
- package/Editor/Styles/AnimationViewer.uss +116 -0
- package/Editor/Styles/AnimationViewer.uss.meta +3 -0
- package/Editor/Styles/AnimationViewer.uxml +57 -0
- package/Editor/Styles/AnimationViewer.uxml.meta +3 -0
- package/Editor/Styles.meta +3 -0
- package/Editor/UI.meta +3 -0
- package/Runtime/Core/Attributes/IntDropdownAttribute.cs +14 -0
- package/Runtime/Core/Attributes/IntDropdownAttribute.cs.meta +3 -0
- package/Runtime/UI/LayeredImage.cs +193 -98
- package/Runtime/UI/MultiFileSelectorElement.cs +322 -0
- package/Runtime/UI/MultiFileSelectorElement.cs.meta +3 -0
- package/package.json +3 -1
- package/Editor/AnimatorControllerCopier.cs +0 -156
- package/Editor/AnimatorControllerCopier.cs.meta +0 -3
- /package/Editor/{StringInListeDrawer.cs.meta → CustomDrawers/StringInListeDrawer.cs.meta} +0 -0
- /package/Editor/{WShowIfPropertyDrawer.cs.meta → CustomDrawers/WShowIfPropertyDrawer.cs.meta} +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
namespace WallstopStudios.UnityHelpers.Editor.CustomDrawers
|
|
2
|
+
{
|
|
3
|
+
using Core.Attributes;
|
|
4
|
+
using UnityEditor;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
|
|
7
|
+
[CustomPropertyDrawer(typeof(IntDropdownAttribute))]
|
|
8
|
+
public sealed class IntDropdownDrawer : PropertyDrawer
|
|
9
|
+
{
|
|
10
|
+
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
|
11
|
+
{
|
|
12
|
+
if (attribute is not IntDropdownAttribute dropdown)
|
|
13
|
+
{
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
int currentValue = property.intValue;
|
|
18
|
+
|
|
19
|
+
int selectedIndex = Mathf.Max(0, System.Array.IndexOf(dropdown.Options, currentValue));
|
|
20
|
+
string[] displayedOptions = System.Array.ConvertAll(
|
|
21
|
+
dropdown.Options,
|
|
22
|
+
opt => opt.ToString()
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
EditorGUI.BeginProperty(position, label, property);
|
|
26
|
+
try
|
|
27
|
+
{
|
|
28
|
+
selectedIndex = EditorGUI.Popup(
|
|
29
|
+
position,
|
|
30
|
+
label.text,
|
|
31
|
+
selectedIndex,
|
|
32
|
+
displayedOptions
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
if (selectedIndex >= 0 && selectedIndex < dropdown.Options.Length)
|
|
36
|
+
{
|
|
37
|
+
property.intValue = dropdown.Options[selectedIndex];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
finally
|
|
41
|
+
{
|
|
42
|
+
EditorGUI.EndProperty();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
namespace WallstopStudios.UnityHelpers.Editor
|
|
1
|
+
namespace WallstopStudios.UnityHelpers.Editor.CustomDrawers
|
|
2
2
|
{
|
|
3
3
|
#if UNITY_EDITOR
|
|
4
4
|
using System;
|
|
5
5
|
using UnityEditor;
|
|
6
6
|
using UnityEngine;
|
|
7
|
-
using Core.Helper;
|
|
7
|
+
using WallstopStudios.UnityHelpers.Core.Helper;
|
|
8
8
|
|
|
9
9
|
[CustomPropertyDrawer(typeof(StringInList))]
|
|
10
10
|
public class StringInListDrawer : PropertyDrawer
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
namespace WallstopStudios.UnityHelpers.Editor
|
|
1
|
+
namespace WallstopStudios.UnityHelpers.Editor.CustomDrawers
|
|
2
2
|
{
|
|
3
3
|
#if UNITY_EDITOR
|
|
4
4
|
using System.Reflection;
|
|
5
5
|
using UnityEditor;
|
|
6
6
|
using UnityEngine;
|
|
7
|
-
using Core.Attributes;
|
|
8
|
-
using Core.Extension;
|
|
7
|
+
using WallstopStudios.UnityHelpers.Core.Attributes;
|
|
8
|
+
using WallstopStudios.UnityHelpers.Core.Extension;
|
|
9
9
|
|
|
10
10
|
[CustomPropertyDrawer(typeof(WShowIfAttribute))]
|
|
11
11
|
public sealed class WShowIfPropertyDrawer : PropertyDrawer
|