Skip to content

Activate

Jan-Ole Schümann edited this page May 21, 2017 · 1 revision

Static Method Activate

void Activate(Type pluginType)

This Method allows you to register your own custom plugins with TweenSharp.

All plugins must

  • inherit from TSPlugin
  • override PropertyName
  • override get and set Value

PropertyName defines the keyword for the TweenSharp constructor. If the defined keyword is encountered, TweenSharp will use the plugin for reading and writing the value instead of accessing it directly. "Value" needs to be overridden to define how the value is changed on the target object.

Optinally, "Target" can be overridden. This is used for example in the x-,y- and z-plugins to detect what type of object is to be tweened (GameObject, Transform or RectTransfrom), and in case of a GameObject wether to tween the Transform or RectTransform.

Clone this wiki locally