Skip to content

My extensions for the GoKit tween llibrary for Unity 3D. Currently contains anchor tweening for the new UI system.

License

Notifications You must be signed in to change notification settings

geo-at-github/unity-go-kit-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

unity-go-kit-extension

My extensions for the GoKit tween library for Unity 3D (https://github.com/prime31/GoKit). It contains tweens for achorPositions (tween all four anchors relative to their "center") and the anchored position (http://docs.unity3d.com/ScriptReference/RectTransform-anchoredPosition.html).

It is implemented with c# extension methods to GoKit (https://msdn.microsoft.com/en-us/library/bb383977.aspx).

Usage

Usage is similar to the translation tweens in GoKit. The target object needs to have a RectTransform.

Import the extension with using GeosGoKitExtension;

anchorPositions(this GoTweenConfig goTweenConfig, Vector2 endValue, bool isRelative = false)

Vector2 targetPos = new Vector2( 0.0f, 0.0f);
var anchorPositionsTween = new GoTween(your2dObject.transform, 1.0f, new GoTweenConfig().anchorPositions(targetPos, false));

anchoredPosition(this GoTweenConfig goTweenConfig, Vector2 endValue, bool isRelative = false)

Vector2 targetPos = new Vector2( 0.0f, 0.0f);
var anchorPositionsTween = new GoTween(your2dObject.transform, 1.0f, new GoTweenConfig().anchoredPosition(targetPos, false));

Installation

Simply add the folder to your script assets in Unity.

About

My extensions for the GoKit tween llibrary for Unity 3D. Currently contains anchor tweening for the new UI system.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages