Case Status
Log In


Home ยป API Reference»Writing Custom Actions»ActionHelpers Class
Community Wiki

ActionHelpers Class

The ActionHelpers class provides static methods to simplify common tasks in Actions:

Static Methods
bool IsVisible(GameObject go)

Check the visibility of the Renderer on a GameObject.

GameObject GetOwnerDefault(FsmStateAction action, FsmOwnerDefault ownerDefault)

Get the GameObject targeted by an action's FsmOwnerDefault variable.

PlayMakerFSM GetGameObjectFsm(GameObject go, string fsmName)

Get a PlayMakerFSM on a GameObject. If fsmName is null or empty it returns the first PlayMakerFSM component it finds.

int GetRandomWeightedIndex(FsmFloat[] weights)

Given an array of weights, returns a randomly selected index. 

void AddAnimationClip(GameObject go, AnimationClip animClip)
Add an animation clip to a GameObject if it has an Animation component.
bool HasAnimationFinished(AnimationState anim, float prevTime, float currentTime)

Check if an animation has finished playing.


TIP: Search the official actions for ActionHelpers for example usage.


Last modified on 6/12/2018 9:15 AM by User.

  • RSS Feed