com.wallstop-studios.unity-helpers 2.0.0-rc73.19 → 2.0.0-rc73.3
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/{Sprites/AnimationCopier.cs → AnimationCopier.cs} +209 -84
- package/Editor/{Sprites/AnimationCreator.cs → AnimationCreator.cs} +100 -29
- package/Editor/AnimationEventEditor.cs +23 -10
- package/Editor/CustomEditors/MatchColliderToSpriteEditor.cs +1 -1
- package/Editor/FitTextureSizeWindow.cs +53 -14
- package/Editor/PrefabChecker.cs +18 -11
- package/Editor/SpriteAtlasGenerator.cs +914 -0
- package/Editor/SpriteAtlasGenerator.cs.meta +3 -0
- package/Editor/{Sprites/SpriteCropper.cs → SpriteCropper.cs} +143 -172
- package/Editor/{Sprites/SpriteSettingsApplier.cs → SpriteSettingsApplier.cs} +77 -12
- package/Editor/{Sprites/TextureResizerWizard.cs → TextureResizerWizard.cs} +1 -1
- package/Editor/{Sprites/TextureSettingsApplier.cs → TextureSettingsApplier.cs} +1 -1
- package/Editor/Utils/DxReadOnlyPropertyDrawer.cs +1 -1
- package/Editor/Utils/GUIHorizontalScope.cs +20 -0
- package/Editor/Utils/GUIHorizontalScope.cs.meta +3 -0
- package/Runtime/Core/DataStructure/Circle.cs +1 -1
- package/Runtime/Core/DataStructure/QuadTree.cs +4 -4
- package/Runtime/Core/Extension/ColorExtensions.cs +5 -5
- package/Runtime/Core/Extension/IEnumerableExtensions.cs +1 -1
- package/Runtime/Core/Extension/UnityExtensions.cs +14 -14
- package/Runtime/Core/Helper/DirectoryHelper.cs +0 -64
- package/Runtime/Core/Helper/Helpers.cs +9 -9
- package/Runtime/Core/Helper/Logging/UnityLogTagFormatter.cs +8 -31
- package/Runtime/Core/Helper/Partials/ObjectHelpers.cs +4 -5
- package/Runtime/Core/Helper/PathHelper.cs +1 -2
- package/Runtime/Core/Random/DotNetRandom.cs +1 -1
- package/Runtime/Core/Random/SplitMix64.cs +1 -1
- package/Runtime/Core/Random/SquirrelRandom.cs +7 -7
- package/Runtime/Core/Random/ThreadLocalRandom.cs +1 -1
- package/Runtime/Core/Random/WyRandom.cs +1 -1
- package/Runtime/Tags/EffectHandler.cs +1 -1
- package/Runtime/UI/LayeredImage.cs +161 -309
- package/Runtime/Utils/AnimatorEnumStateMachine.cs +1 -1
- package/Runtime/Utils/SetTextureImportData.cs +1 -1
- package/Runtime/Utils/TextureScale.cs +4 -4
- package/Styles/Elements/Progress/MarchingAntsProgressBar.cs +20 -20
- package/package.json +1 -17
- package/Editor/CustomEditors/PersistentDirectoryGUI.cs +0 -796
- package/Editor/CustomEditors/PersistentDirectoryGUI.cs.meta +0 -3
- package/Editor/CustomEditors/SourceFolderEntryDrawer.cs +0 -275
- package/Editor/CustomEditors/SourceFolderEntryDrawer.cs.meta +0 -3
- package/Editor/PersistentDirectorySettings.cs +0 -248
- package/Editor/PersistentDirectorySettings.cs.meta +0 -3
- package/Editor/Sprites/ScriptableSpriteAtlas.cs +0 -95
- package/Editor/Sprites/ScriptableSpriteAtlas.cs.meta +0 -3
- package/Editor/Sprites/ScriptableSpriteAtlasEditor.cs +0 -930
- package/Editor/Sprites/ScriptableSpriteAtlasEditor.cs.meta +0 -3
- package/Editor/Sprites.meta +0 -3
- /package/Editor/{Sprites/AnimationCopier.cs.meta → AnimationCopier.cs.meta} +0 -0
- /package/Editor/{Sprites/AnimationCreator.cs.meta → AnimationCreator.cs.meta} +0 -0
- /package/Editor/{Sprites/SpriteCropper.cs.meta → SpriteCropper.cs.meta} +0 -0
- /package/Editor/{Sprites/SpriteSettingsApplier.cs.meta → SpriteSettingsApplier.cs.meta} +0 -0
- /package/Editor/{Sprites/TextureResizerWizard.cs.meta → TextureResizerWizard.cs.meta} +0 -0
- /package/Editor/{Sprites/TextureSettingsApplier.cs.meta → TextureSettingsApplier.cs.meta} +0 -0
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
}
|
|
55
55
|
else
|
|
56
56
|
{
|
|
57
|
-
ratioX = (float)tex.width / newWidth;
|
|
58
|
-
ratioY = (float)tex.height / newHeight;
|
|
57
|
+
ratioX = ((float)tex.width) / newWidth;
|
|
58
|
+
ratioY = ((float)tex.height) / newHeight;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
w = tex.width;
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
int y2 = (yFloor + 1) * w;
|
|
124
124
|
int yw = y * w2;
|
|
125
125
|
|
|
126
|
-
for (
|
|
126
|
+
for (var x = 0; x < w2; x++)
|
|
127
127
|
{
|
|
128
128
|
int xFloor = (int)Mathf.Floor(x * ratioX);
|
|
129
129
|
float xLerp = x * ratioX - xFloor;
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
{
|
|
156
156
|
int thisY = (int)(ratioY * y) * w;
|
|
157
157
|
int yw = y * w2;
|
|
158
|
-
for (
|
|
158
|
+
for (var x = 0; x < w2; x++)
|
|
159
159
|
{
|
|
160
160
|
newColors[yw + x] = texColors[(int)(thisY + ratioX * x)];
|
|
161
161
|
}
|
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
Vertical = 1,
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
public const string
|
|
17
|
-
public const string
|
|
18
|
-
public const string
|
|
19
|
-
public const string
|
|
20
|
-
public const string
|
|
21
|
-
public const string
|
|
22
|
-
public const string
|
|
23
|
-
public const string
|
|
24
|
-
public const string
|
|
25
|
-
public const string
|
|
16
|
+
public const string ussClassName = "marching-ants-progress-bar";
|
|
17
|
+
public const string ussTrackClassName = ussClassName + "__track";
|
|
18
|
+
public const string ussFillContainerClassName = ussClassName + "__fill-container";
|
|
19
|
+
public const string ussFillClassName = ussClassName + "__fill";
|
|
20
|
+
public const string ussTrackColorVarName = "--ants-track-color";
|
|
21
|
+
public const string ussProgressColorVarName = "--ants-progress-color";
|
|
22
|
+
public const string ussThicknessVarName = "--ants-thickness";
|
|
23
|
+
public const string ussBorderRadiusVarName = "--ants-border-radius";
|
|
24
|
+
public const string ussDashOnVarName = "--ants-dash-on";
|
|
25
|
+
public const string ussDashOffVarName = "--ants-dash-off";
|
|
26
26
|
|
|
27
27
|
private readonly VisualElement _trackElement;
|
|
28
28
|
private readonly VisualElement _fillContainer;
|
|
@@ -288,9 +288,9 @@
|
|
|
288
288
|
|
|
289
289
|
public MarchingAntsProgressBar()
|
|
290
290
|
{
|
|
291
|
-
AddToClassList(
|
|
291
|
+
AddToClassList(ussClassName);
|
|
292
292
|
_trackElement = new VisualElement { name = "track", pickingMode = PickingMode.Ignore };
|
|
293
|
-
_trackElement.AddToClassList(
|
|
293
|
+
_trackElement.AddToClassList(ussTrackClassName);
|
|
294
294
|
_trackElement.style.position = Position.Absolute;
|
|
295
295
|
_trackElement.style.left = 0;
|
|
296
296
|
_trackElement.style.top = 0;
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
name = "fill-container",
|
|
304
304
|
pickingMode = PickingMode.Ignore,
|
|
305
305
|
};
|
|
306
|
-
_fillContainer.AddToClassList(
|
|
306
|
+
_fillContainer.AddToClassList(ussFillContainerClassName);
|
|
307
307
|
_fillContainer.style.overflow = Overflow.Hidden;
|
|
308
308
|
_fillContainer.style.position = Position.Absolute;
|
|
309
309
|
_fillContainer.style.left = 0;
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
_fillContainer.style.height = Length.Percent(100);
|
|
313
313
|
Add(_fillContainer);
|
|
314
314
|
_fillElement = new VisualElement { name = "fill", pickingMode = PickingMode.Ignore };
|
|
315
|
-
_fillElement.AddToClassList(
|
|
315
|
+
_fillElement.AddToClassList(ussFillClassName);
|
|
316
316
|
_fillElement.style.position = Position.Absolute;
|
|
317
317
|
_fillElement.style.left = 0;
|
|
318
318
|
_fillElement.style.top = 0;
|
|
@@ -453,7 +453,7 @@
|
|
|
453
453
|
{
|
|
454
454
|
if (
|
|
455
455
|
customStyle.TryGetValue(
|
|
456
|
-
new CustomStyleProperty<Color>(
|
|
456
|
+
new CustomStyleProperty<Color>(ussTrackColorVarName),
|
|
457
457
|
out Color tc
|
|
458
458
|
)
|
|
459
459
|
)
|
|
@@ -463,7 +463,7 @@
|
|
|
463
463
|
|
|
464
464
|
if (
|
|
465
465
|
customStyle.TryGetValue(
|
|
466
|
-
new CustomStyleProperty<Color>(
|
|
466
|
+
new CustomStyleProperty<Color>(ussProgressColorVarName),
|
|
467
467
|
out Color pc
|
|
468
468
|
)
|
|
469
469
|
)
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
|
|
474
474
|
if (
|
|
475
475
|
customStyle.TryGetValue(
|
|
476
|
-
new CustomStyleProperty<float>(
|
|
476
|
+
new CustomStyleProperty<float>(ussThicknessVarName),
|
|
477
477
|
out float th
|
|
478
478
|
)
|
|
479
479
|
)
|
|
@@ -483,7 +483,7 @@
|
|
|
483
483
|
|
|
484
484
|
if (
|
|
485
485
|
customStyle.TryGetValue(
|
|
486
|
-
new CustomStyleProperty<float>(
|
|
486
|
+
new CustomStyleProperty<float>(ussBorderRadiusVarName),
|
|
487
487
|
out float br
|
|
488
488
|
)
|
|
489
489
|
)
|
|
@@ -493,7 +493,7 @@
|
|
|
493
493
|
|
|
494
494
|
if (
|
|
495
495
|
customStyle.TryGetValue(
|
|
496
|
-
new CustomStyleProperty<float>(
|
|
496
|
+
new CustomStyleProperty<float>(ussDashOnVarName),
|
|
497
497
|
out float don
|
|
498
498
|
)
|
|
499
499
|
)
|
|
@@ -503,7 +503,7 @@
|
|
|
503
503
|
|
|
504
504
|
if (
|
|
505
505
|
customStyle.TryGetValue(
|
|
506
|
-
new CustomStyleProperty<float>(
|
|
506
|
+
new CustomStyleProperty<float>(ussDashOffVarName),
|
|
507
507
|
out float doff
|
|
508
508
|
)
|
|
509
509
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "com.wallstop-studios.unity-helpers",
|
|
3
|
-
"version": "2.0.0-rc73.
|
|
3
|
+
"version": "2.0.0-rc73.3",
|
|
4
4
|
"displayName": "Unity Helpers",
|
|
5
5
|
"description": "Various Unity Helper Library",
|
|
6
6
|
"dependencies": {},
|
|
@@ -39,19 +39,3 @@
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|