How to Change Animation type in DragonBones Armature?

Hi,

I’m currently trying to animate 2D sprites using DragonBones in Unity (run-time).
I have a separate script called GameController, from which I want to change Animation type (say from forward to left).

It is possible to change it from inspector. But I’m finding it hard to access it from another script (namely GameController).
Your help is highly appreciated

Try calling the unityArmatureComponent from your GameController script (or make it publit so you can drag it directly to the script). Then call the animation component from your UnityArmatureComponent variable and use Play or FadeIn functions to call the animation.

E.g.
public UnityArmatureComponent player;

player.animation.Play(“Idle”);
or
player.animation.FadeIn(“Walk”, 0.1f);

Also remember to import the DragonBones library to be able to call the UnityArmatureComponent.
#using DragonBones.