• Stars
    star
    583
  • Rank 76,663 (Top 2 %)
  • Language
    C#
  • Created over 12 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Lightweight tween library for Unity

GoKit

Lightweight tween library for Unity aimed at making tweening objects dead simple and completely flexible. The wiki contains some usage information and examples.

Meet the GoKit Players

  • Tween: base class that handles a list of TweenProperties to be animated concurrently, tween duration, loop count/type and the object to perform the animations on. Hang on to a reference if you need to control the Tween after it starts (play, pause, reverse, restart, goto, etc). Tweens are automatically removed from GoKit when they complete by default. If you set them not to be automatically removed, they will be left in the tween engine and you can restart/reverse/reset them at a later time. Tweens can be set to update in the standard Update, FixedUpdate or LateUpdate methods or via a time scale independent update (handy when animating something while time scale is set to 0).
  • TweenConfig: passed to the Tween constructor and contains a list of the TweenProperties, ease type, completion handler, etc. These can be created using method chaining for a JQuery-like flow or via standard instantiation and property setting. They're fully reuseable so save these if you intend to create multiple Tweens with the same config.
  • TweenProperty: houses the value to tween to and the ease function to use while tweening. Optionally, each TweenProperty can be set to relative, meaning the property will move by the end value specified rather than to it. Fully reuseable.
  • TweenChain: used to manage a series of Tweens (or TweenChains/TweenFlows). You can append/prepend elements (and delay intervals) to make a single chain of animations. It offers the same playback controls as a standard Tween except they operate on the entire chain instead of a single Tween.
  • TweenFlow: used to manage a timeline of Tweens (or TweenChains/TweenFlows) each with specific start time. Contrary to a TweenChain where each member must complete before the next starts TweenFlows allow you to overlap playback of it's members. TweenFlows offer the same playback controls as a standard Tween except they operate on the entire flow instead of a single Tween.

What can I Tween?

Short answer: anything. You can tween any property on any object of type Vector2, Vector3 (including through a series of Vector3s), Vector4, int, float or Color. These make up what we call generic tweens. Generic tweens are slightly slower than specific tweens. We did some heavy-duty benchmarking and used some .NET trickery to make them pretty darn fast though. That being said, the library also offers what we call specific tweens. These are confined to a specific target object type and property and use direct access for the tween making them hyper fast. The available specific tweens are eulerAngles, localEulerAngles, material colors (_Color, _SpecColor, _Emission and _ReflectColor), position, localPosition (along with following a path) and scale. You can also always make your own specific Tweens using the fully extensible TweenProperty system.

Extension Methods For Ease of Use and Syntax Sugar (sorry UnityScript users)

GoKit adds extension methods to the Transform and Material classes for easy access to creating often-used single property animations. If there is a particular animation combo that you use often, use the GoKitTweenExtensions class as a template to make your own Extension methods on any class or object.

License

For any developers just wanting to use GoKit in their games go right ahead. You can use GoKit in any and all games either modified or unmodified. In order to keep the spirit of this open source project it is expressly forbid to sell or commercially distribute GoKit outside of your games. You can freely use it in as many games as you would like but you cannot commercially distribute the source code either directly or compiled into a library outside of your game.

More Repositories

1

Nez

Nez is a free 2D focused framework that works with MonoGame and FNA
C#
1,799
star
2

CharacterController2D

C#
1,032
star
3

TouchKit

Gestures and input handling made sane for Unity
C#
896
star
4

RecyclerKit

Object pool manager for Unity
C#
363
star
5

TransitionKit

Modular, extensible transitions in scene and between scenes
C#
300
star
6

SpriteLightKit

Blended lighting system for Unity that works with standard Sprites
C#
227
star
7

StateKit

Dead simple, lightweight "states as objects" system
C#
220
star
8

ZestKit

Tween library for Unity. The best of GoKit and GoKitLite combined in an easy to use API
C#
156
star
9

Nez-Samples

Samples and demos of various Nez features
C#
148
star
10

zig-ecs

Zig
144
star
11

P31UnityAddOns

Mostly defunct. Features were added and components broken out in the *Kit repositories.
C#
142
star
12

zig-upaya

Zig-based framework for creating game tools and helper apps
Zig
124
star
13

MessageKit

Decoupled message sending system meant as a replacement for SendMessage and its variants.
C#
122
star
14

zig-gamekit

Companion repo for zig-renderkit for making 2D games
Zig
103
star
15

CameraKit2D

Framework for creating 2D camera systems
C#
95
star
16

zig-renderkit

Zig
54
star
17

zig-flecs

C
51
star
18

GoKitLite

A super duper lightweight tweening library for Unity
C#
51
star
19

SoundKit

C#
45
star
20

Unity-Ripgrep-Search-Tool

C#
42
star
21

P31TaskManager

General purpose task manager that provides a lot more control and power than a standard coroutine
C#
35
star
22

via

V 2D game library
V
29
star
23

UnityCgShaderTutorials

Source code for the Unity Cg Shaders tutorial series on YouTube: http://www.youtube.com/playlist?list=PLb8LPjN5zpx1tauZfNE1cMIIPy15UlJNZ
C#
27
star
24

V-C-Wrapper-Generator

Helper for generating Odin and V wrapper code from C source
C#
19
star
25

Simple-ECS-Sharp

C#
18
star
26

ecs-lua

A simple, hybrid ECS
Lua
17
star
27

zig-miniaudio

Zig
17
star
28

SpriteKit

DEFUNCT: Unity now has 2D tools built in. This is now not maintained.
C#
15
star
29

PaletteKit

Helpful editor classes for importing and displaying color palettes
JavaScript
12
star
30

LearningUnits

C#
10
star
31

Odin-Sublime-Text-Plugin

Python
9
star
32

ImGuiGL-Renderer

C#
9
star
33

zig-vulkan

C++
5
star
34

egui_curve_tool

Rust
4
star
35

zig-aya

Zig
4
star
36

App-Engine-Task-Manager

Python
3
star
37

Odin-Libs

C
3
star
38

v-temp-modules

V
3
star
39

zig-fmod

Zig
2
star
40

Hugo-Helper

macOS app for managing a Hugo website
C#
2
star
41

prime31.github.io

HTML
2
star
42

fips-flecs

fipsified version of the Flecs ECS
CMake
1
star