diff --git a/Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs b/Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs index 634ac54d..b99dfa43 100644 --- a/Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs +++ b/Assets/Fungus/iTween/Scripts/Commands/iTweenCommand.cs @@ -40,7 +40,14 @@ namespace Fungus Continue(); return; } - + + // Force any existing iTweens on this target object to complete immediately + iTween[] tweens = targetObject.GetComponents(); + foreach (iTween tween in tweens) { + tween.time = 0; + tween.SendMessage("Update"); + } + DoTween(); if (!waitUntilFinished) diff --git a/Assets/Tests/Tweening/TweeningTests.unity b/Assets/Tests/Tweening/TweeningTests.unity index c58e08ac..19d42437 100644 --- a/Assets/Tests/Tweening/TweeningTests.unity +++ b/Assets/Tests/Tweening/TweeningTests.unity @@ -37,9 +37,6 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} ---- !u!127 &3 -LevelGameManager: - m_ObjectHideFlags: 0 --- !u!157 &4 LightmapSettings: m_ObjectHideFlags: 0 @@ -68,6 +65,7 @@ LightmapSettings: m_TextureCompression: 1 m_FinalGather: 0 m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 m_LightmapSnapshot: {fileID: 0} m_RuntimeCPUUsage: 25 --- !u!196 &5 @@ -210,7 +208,7 @@ MonoBehaviour: m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: - m_AllowActivationOnStandalone: 0 + m_ForceModuleActive: 0 --- !u!114 &262304136 MonoBehaviour: m_ObjectHideFlags: 0 @@ -228,7 +226,7 @@ MonoBehaviour: m_CancelButton: Cancel m_InputActionsPerSecond: 10 m_RepeatDelay: .5 - m_AllowActivationOnMobileDevice: 0 + m_ForceModuleActive: 0 --- !u!114 &262304137 MonoBehaviour: m_ObjectHideFlags: 0 @@ -299,9 +297,8 @@ MonoBehaviour: y: -340 width: 1114 height: 859 - selectedBlock: {fileID: 636648075} - selectedCommands: - - {fileID: 636648074} + selectedBlock: {fileID: 0} + selectedCommands: [] variables: [] description: stepPause: 0 @@ -309,6 +306,7 @@ MonoBehaviour: hideComponents: 1 saveSelection: 1 localizationId: + hideCommands: [] --- !u!114 &636648074 MonoBehaviour: m_ObjectHideFlags: 2 @@ -377,7 +375,7 @@ MonoBehaviour: parentBlock: {fileID: 636648075} --- !u!114 &636648078 MonoBehaviour: - m_ObjectHideFlags: 0 + m_ObjectHideFlags: 2 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 636648072} @@ -392,6 +390,80 @@ MonoBehaviour: duration: 1 targetView: {fileID: 958434155} waitUntilFinished: 0 +--- !u!114 &707882883 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6febd2d5046657040b3da98b7010ee29, type: 3} + m_Name: + m_EditorClassIdentifier: + go: {fileID: 770022207} + thisPropertyPath: Transform.localScale + compareToType: 1 + other: {fileID: 0} + otherPropertyPath: + constantValueGeneric: {x: 3, y: 3, z: 1} + compareType: 0 + floatingPointError: 9.9999997473787516e-05 +--- !u!1 &770022207 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100000, guid: 0e6bcf37a2876432fa58eff8888bf177, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 770022209} + - 212: {fileID: 770022208} + m_Layer: 0 + m_Name: Sprite + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!212 &770022208 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 21200000, guid: 0e6bcf37a2876432fa58eff8888bf177, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 770022207} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000e000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 0 + m_ReflectionProbeUsage: 0 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_ImportantGI: 0 + m_AutoUVMaxDistance: .5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: ea8f56c43254d41728f5ac4e8299b6c9, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} +--- !u!4 &770022209 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400000, guid: 0e6bcf37a2876432fa58eff8888bf177, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 770022207} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1575643978} + m_RootOrder: 1 --- !u!1 &958434153 GameObject: m_ObjectHideFlags: 0 @@ -435,6 +507,96 @@ MonoBehaviour: viewSize: .5 primaryAspectRatio: {x: 4, y: 3} secondaryAspectRatio: {x: 2, y: 1} +--- !u!114 &1129657643 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6febd2d5046657040b3da98b7010ee29, type: 3} + m_Name: + m_EditorClassIdentifier: + go: {fileID: 770022207} + thisPropertyPath: Transform.position + compareToType: 1 + other: {fileID: 0} + otherPropertyPath: + constantValueGeneric: {x: 2, y: 0, z: 0} + compareType: 0 + floatingPointError: 9.9999997473787516e-05 +--- !u!1 &1174492717 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1174492718} + - 114: {fileID: 1174492719} + - 114: {fileID: 1174492720} + m_Layer: 0 + m_Name: TestAssertions + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1174492718 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1174492717} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1575643978} + m_RootOrder: 2 +--- !u!114 &1174492719 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1174492717} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8bafa54482a87ac4cbd7ff1bfd1ac93a, type: 3} + m_Name: + m_EditorClassIdentifier: + checkAfterTime: 3 + repeatCheckTime: 0 + repeatEveryTime: 1 + checkAfterFrames: 1 + repeatCheckFrame: 1 + repeatEveryFrame: 1 + hasFailed: 0 + checkMethods: 1 + m_ActionBase: {fileID: 1129657643} + checksPerformed: 0 +--- !u!114 &1174492720 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1174492717} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8bafa54482a87ac4cbd7ff1bfd1ac93a, type: 3} + m_Name: + m_EditorClassIdentifier: + checkAfterTime: 3 + repeatCheckTime: 0 + repeatEveryTime: 1 + checkAfterFrames: 1 + repeatCheckFrame: 1 + repeatEveryFrame: 1 + hasFailed: 0 + checkMethods: 1 + m_ActionBase: {fileID: 707882883} + checksPerformed: 0 --- !u!1 &1302708863 GameObject: m_ObjectHideFlags: 0 @@ -503,6 +665,7 @@ Camera: m_RenderingPath: -1 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 + m_TargetEye: 3 m_HDR: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 @@ -520,6 +683,58 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 +--- !u!1 &1575643977 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1575643978} + - 114: {fileID: 1575643979} + m_Layer: 0 + m_Name: iTweenConflictTest + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1575643978 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1575643977} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1986982192} + - {fileID: 770022209} + - {fileID: 1174492718} + m_Father: {fileID: 0} + m_RootOrder: 4 +--- !u!114 &1575643979 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1575643977} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b1dba0b27b0864740a8720e920aa88c0, type: 3} + m_Name: + m_EditorClassIdentifier: + timeout: 5 + ignored: 0 + succeedAfterAllAssertionsAreExecuted: 1 + expectException: 0 + expectedExceptionList: + succeedWhenExceptionIsThrown: 0 + includedPlatforms: -1 + platformsToIgnore: [] + dynamic: 0 + dynamicTypeName: --- !u!1 &1709878684 GameObject: m_ObjectHideFlags: 0 @@ -535,7 +750,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!114 &1709878685 MonoBehaviour: m_ObjectHideFlags: 0 @@ -592,6 +807,208 @@ MonoBehaviour: constantValueGeneric: .5 compareTypes: 0 floatingPointError: 9.9999997473787516e-05 +--- !u!1 &1986982187 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 142980, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1986982192} + - 114: {fileID: 1986982188} + - 114: {fileID: 1986982190} + - 114: {fileID: 1986982191} + - 114: {fileID: 1986982189} + - 114: {fileID: 1986982194} + - 114: {fileID: 1986982196} + - 114: {fileID: 1986982195} + - 114: {fileID: 1986982193} + m_Layer: 0 + m_Name: Flowchart + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1986982188 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11430050, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1986982187} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 1.0 + scrollPos: {x: 0, y: 0} + variablesScrollPos: {x: 0, y: 0} + variablesExpanded: 1 + blockViewHeight: 400 + zoom: 1 + scrollViewRect: + serializedVersion: 2 + x: -343 + y: -340 + width: 1205 + height: 870 + selectedBlock: {fileID: 1986982190} + selectedCommands: + - {fileID: 1986982189} + variables: [] + description: + stepPause: 0 + colorCommands: 1 + hideComponents: 1 + saveSelection: 1 + localizationId: + hideCommands: [] +--- !u!114 &1986982189 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1986982187} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 445c07472dafe4e0ead0e88c4b757401, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 1 + errorMessage: + indentLevel: 0 + targetObject: {fileID: 770022207} + tweenName: + duration: 2 + easeType: 2 + loopType: 0 + waitUntilFinished: 1 + toTransform: {fileID: 0} + toPosition: {x: 2, y: 0, z: 0} + isLocal: 1 +--- !u!114 &1986982190 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 11433304, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1986982187} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 137 + y: 72 + width: 120 + height: 40 + itemId: 0 + blockName: Start 1 + description: + eventHandler: {fileID: 1986982191} + commandList: + - {fileID: 1986982189} +--- !u!114 &1986982191 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_PrefabParentObject: {fileID: 11462346, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1986982187} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 1986982190} +--- !u!4 &1986982192 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 467082, guid: 5e7fbc8d4eb714b279eeeef2262c1e1a, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1986982187} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1575643978} + m_RootOrder: 0 +--- !u!114 &1986982193 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1986982187} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c4998e756a5d84f4ab55e075dad751b1, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 5 + errorMessage: + indentLevel: 0 + targetObject: {fileID: 770022207} + tweenName: + duration: 1 + easeType: 2 + loopType: 0 + waitUntilFinished: 1 + offset: {x: 2, y: 2, z: 0} +--- !u!114 &1986982194 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1986982187} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} + m_Name: + m_EditorClassIdentifier: + nodeRect: + serializedVersion: 2 + x: 309 + y: 74 + width: 120 + height: 40 + itemId: 2 + blockName: Start 2 + description: + eventHandler: {fileID: 1986982196} + commandList: + - {fileID: 1986982195} + - {fileID: 1986982193} +--- !u!114 &1986982195 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1986982187} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3315ad2ebb85443909a1203d56d9344e, type: 3} + m_Name: + m_EditorClassIdentifier: + itemId: 4 + errorMessage: + indentLevel: 0 + duration: 1 +--- !u!114 &1986982196 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1986982187} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d2f6487d21a03404cb21b245f0242e79, type: 3} + m_Name: + m_EditorClassIdentifier: + parentBlock: {fileID: 1986982194} --- !u!1 &1992120118 GameObject: m_ObjectHideFlags: 1 @@ -619,7 +1036,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3} m_Name: m_EditorClassIdentifier: - selectedFlowchart: {fileID: 636648073} + selectedFlowchart: {fileID: 1986982188} --- !u!4 &1992120120 Transform: m_ObjectHideFlags: 1