com.kyrylokuzyk.primetween 1.3.1 → 1.3.2
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/Runtime/Internal/PrimeTweenManager.cs +3 -3
- package/Runtime/PrimeTweenConfig.cs +2 -0
- package/Runtime/Sequence.cs +9 -9
- package/Tests/Sequence.cs +4 -0
- package/changelog.md +4 -0
- package/package.json +3 -3
- package/readme.md +1 -1
|
@@ -20,13 +20,13 @@ namespace PrimeTween {
|
|
|
20
20
|
internal static PrimeTweenManager Instance {
|
|
21
21
|
get {
|
|
22
22
|
if (!HasInstance) {
|
|
23
|
-
|
|
23
|
+
if (Application.isEditor) {
|
|
24
24
|
CreateInstance();
|
|
25
25
|
_instance.gameObject.hideFlags = HideFlags.HideAndDontSave;
|
|
26
|
-
|
|
26
|
+
} else {
|
|
27
27
|
const string error = nameof(PrimeTweenManager) + " is not created yet. Please add the 'PRIME_TWEEN_EXPERIMENTAL' define to your project, then use '" + nameof(PrimeTweenConfig) + "." + nameof(PrimeTweenConfig.ManualInitialize) + "()' to initialize PrimeTween before '" + nameof(RuntimeInitializeLoadType) + "." + nameof(RuntimeInitializeLoadType.BeforeSceneLoad) + "'.";
|
|
28
28
|
throw new Exception(error);
|
|
29
|
-
|
|
29
|
+
}
|
|
30
30
|
} /*else if (_instance == null) { // todo this throws if PrimeTween API is called from OnDestroy(). See the DestructionOrderTest scene. How to detect manual PrimeTweenManager destruction?
|
|
31
31
|
throw new Exception(nameof(PrimeTweenManager) + " was manually destroyed after creation, which is not allowed. Please check you're not destroying all objects manually.");
|
|
32
32
|
}*/
|
package/Runtime/Sequence.cs
CHANGED
|
@@ -284,22 +284,22 @@ namespace PrimeTween {
|
|
|
284
284
|
}
|
|
285
285
|
var rootTween = root.tween;
|
|
286
286
|
if (tween._isPaused && tween._isPaused != rootTween._isPaused) {
|
|
287
|
-
warnIgnoredChildrenSetting(nameof(isPaused));
|
|
287
|
+
warnIgnoredChildrenSetting(nameof(isPaused), rootTween._isPaused, tween._isPaused);
|
|
288
288
|
}
|
|
289
289
|
if (tween.timeScale != 1f && tween.timeScale != rootTween.timeScale) {
|
|
290
|
-
warnIgnoredChildrenSetting(nameof(timeScale));
|
|
290
|
+
warnIgnoredChildrenSetting(nameof(timeScale), rootTween.timeScale, tween.timeScale);
|
|
291
291
|
}
|
|
292
292
|
if (tween.settings.useUnscaledTime && tween.settings.useUnscaledTime != rootTween.settings.useUnscaledTime) {
|
|
293
|
-
warnIgnoredChildrenSetting(nameof(TweenSettings.useUnscaledTime));
|
|
293
|
+
warnIgnoredChildrenSetting(nameof(TweenSettings.useUnscaledTime), rootTween.settings.useUnscaledTime, tween.settings.useUnscaledTime);
|
|
294
294
|
}
|
|
295
|
-
if (tween.settings._updateType !=
|
|
296
|
-
warnIgnoredChildrenSetting(nameof(TweenSettings.updateType));
|
|
295
|
+
if (tween.settings._updateType != PrimeTweenManager.Instance.defaultUpdateType && tween.settings._updateType != rootTween.settings._updateType) {
|
|
296
|
+
warnIgnoredChildrenSetting(nameof(TweenSettings.updateType), rootTween.settings._updateType, tween.settings._updateType);
|
|
297
297
|
}
|
|
298
|
-
void warnIgnoredChildrenSetting(string settingName) {
|
|
299
|
-
Debug.LogError($"'{settingName}' was ignored after adding child animation to the Sequence
|
|
300
|
-
"To prevent this error:\n" +
|
|
298
|
+
void warnIgnoredChildrenSetting(string settingName, object sequenceSetting, object childSetting) {
|
|
299
|
+
Debug.LogError($"'{settingName}' was ignored after adding child animation to the Sequence (Sequence has '{sequenceSetting}', but the child had '{childSetting}').\n" +
|
|
300
|
+
$"Parent Sequence controls '{settingName}' of all its children animations. To prevent this error:\n" +
|
|
301
301
|
$"- Use the default value of '{settingName}' in child animation.\n" +
|
|
302
|
-
$"- OR use the same '{settingName}' in child animation.\n
|
|
302
|
+
$"- OR use the same '{settingName}' in child animation.\n");
|
|
303
303
|
}
|
|
304
304
|
return true;
|
|
305
305
|
}
|
package/Tests/Sequence.cs
CHANGED
|
@@ -351,6 +351,10 @@ public partial class Tests {
|
|
|
351
351
|
seq.Chain(createSequenceWithNonDefaultSettings());
|
|
352
352
|
LogAssert.NoUnexpectedReceived();
|
|
353
353
|
|
|
354
|
+
Sequence.Create(updateType: UpdateType.FixedUpdate)
|
|
355
|
+
.Group(Tween.PositionY(transform, new(5, 0.1f)))
|
|
356
|
+
.ChainCallback(() => {});
|
|
357
|
+
|
|
354
358
|
return;
|
|
355
359
|
|
|
356
360
|
static void expectErrors() {
|
package/changelog.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## [1.3.2] - 2025-05-18
|
|
2
|
+
### Fixed
|
|
3
|
+
- Fixed: the 'updateType was ignored' error appears if a tween with default 'updateType' is added to a Sequence. https://github.com/KyryloKuzyk/PrimeTween/issues/171
|
|
4
|
+
|
|
1
5
|
## [1.3.1] - 2025-04-27
|
|
2
6
|
### Added
|
|
3
7
|
- Add Edit mode support, so animations can be played in Editor without entering the Play mode. https://github.com/KyryloKuzyk/PrimeTween/discussions/62
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "com.kyrylokuzyk.primetween",
|
|
3
3
|
"displayName": "PrimeTween",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.2",
|
|
5
5
|
"unity": "2018.4",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Kyrylo Kuzyk"
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"documentationUrl": "https://github.com/KyryloKuzyk/PrimeTween",
|
|
35
35
|
"changelogUrl": "https://github.com/KyryloKuzyk/PrimeTween/blob/main/changelog.md",
|
|
36
36
|
"_upm": {
|
|
37
|
-
"changelog": "###
|
|
37
|
+
"changelog": "### Fixed\n- Fixed: the 'updateType was ignored' error appears if a tween with default 'updateType' is added to a Sequence. https://github.com/KyryloKuzyk/PrimeTween/issues/171"
|
|
38
38
|
},
|
|
39
39
|
"repository": {
|
|
40
40
|
"url": "git@bitbucket.org:stampedegames/primetween.git",
|
|
41
41
|
"type": "git",
|
|
42
|
-
"revision": "
|
|
42
|
+
"revision": "3cecdc457560520e4d1945a66ab3e26029619f2a"
|
|
43
43
|
}
|
|
44
44
|
}
|