Skip to content

Commit 88337a2

Browse files
authored
Merge pull request #18 from coryleach/dev
Fix to local tween position bug
2 parents ca70b2d + 14fa151 commit 88337a2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ Includes a SRP shader for blurring the background of UI panels.
2323
#### Using UnityPackageManager (for Unity 2019.3 or later)
2424
Open the package manager window (menu: Window > Package Manager)<br/>
2525
Select "Add package from git URL...", fill in the pop-up with the following link:<br/>
26-
https://github.com/coryleach/UnityGUI.git#3.0.3<br/>
26+
https://github.com/coryleach/UnityGUI.git#3.0.4<br/>
2727

2828
#### Using UnityPackageManager (for Unity 2019.1 or later)
2929

3030
Find the manifest.json file in the Packages folder of your project and edit it to look like this:
3131
```js
3232
{
3333
"dependencies": {
34-
"com.gameframe.gui": "https://github.com/coryleach/UnityGUI.git#3.0.3",
34+
"com.gameframe.gui": "https://github.com/coryleach/UnityGUI.git#3.0.4",
3535
...
3636
},
3737
}

Runtime/Tween/TransformTweenExtensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public static async void DoMove(this Transform transform, Vector3 position, floa
7070

7171
public static async Task DoLocalMoveAsync(this Transform transform, Vector3 position, float duration, Easing easing = Easing.Linear)
7272
{
73-
var startPos = transform.position;
73+
var startPos = transform.localPosition;
7474
await TweenExtensions.DoTweenAsync(transform.gameObject.GetInstanceID(), duration, (t) =>
7575
{
7676
var pt = Vector3.Lerp(startPos, position, t);
@@ -89,7 +89,7 @@ public static async Task DoPunchPositionAsync(this Transform transform, Vector3
8989
await TweenExtensions.DoPunchTweenAsync(transform.gameObject.GetInstanceID(), duration, (t) =>
9090
{
9191
var pt = Vector3.Lerp(startPos, position, t);
92-
transform.localPosition = pt;
92+
transform.position = pt;
9393
}, easing);
9494
}
9595

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.gameframe.gui",
33
"displayName": "Gameframe.GUI",
4-
"version": "3.0.3",
4+
"version": "3.0.4",
55
"description": "This is a library of GUI helpers for UGUI \r\nIncludes a panel system that implements a navigation stack. \r\nIncludes a scene transition system. \r\nIncludes a SRP shader for blurring the background of UI panels.",
66
"keywords": [],
77
"author": {

0 commit comments

Comments
 (0)