Setup
Follow theses steps to get Str8Tween, to include it in your projects and to use it.
Installation
First you need to download the zip file, dll or the unity package.
To do so, go to the download page.
Once you have downloaded one of the files refer to the appropriate paragraph below.
Zip or dll
If you downloaded the zip file, unzip it and add the str8tween.dll file to your "Assets" folder.
For more clarity you can add the dll to a "Plugins" folder as follow or any other custom path : "Assets/Plugins/str8tween.dll".
And you're good to go.
Unity package
Unity packages need to be imported directly using the Unity Editor.
To import the package, go to Assets/Import Package/Custom Package in the editor menu.
Then select the path to the .unitypackage file and click on "open".
You'll have the following files added to your project at Assets/Plugins/Str8Tween/ :
- Str8Tween.dll
- README.md
- LICENSE
- Str8Tween.pdf
Namespace
The different Str8Tween parts are wrapped in a single namespace which is Str8lines.Tweening.
It has to be added as follow at the top of your C# scripts in order to access Str8Tween engine classes :
use Str8lines.Tweening;
Functions
The interesting functions are located in the Str8Tween
and Tween
classes.
Others classes may have public functions but their use has no interest if you just want to use Str8Tween normally.
Str8Tween
There are two types of methods available.
The ones used to create tweens are named after the effect you want to apply to a target (e.g. : move, rotate, fade).
Any other method in Str8Tween
is meant to get existing tweens and manage them.
You can checkout every function available in Str8Tween in the Scripting Api.
Tween
The methods belonging to the Tween
class allows to instantiate, control, and add callbacks on the events of this class instances.
Since Str8Tween
class handles tween's instantiation and other operations at the same time, it's highly recommended to use Str8Tween
methods instead of tween's constructors.
Also, the update()
function being automatically called by the TweensHandler
class at each frame, there's is no need for a user to call it if he just uses Str8Tween as it is.
Additional resources
- Str8Tween scripting api class reference
- Tween scripting api class reference
- TweensHandler scripting api class reference
- AssetPackagesImport external resource