sini You may find the Raptor.cs
, one of the example scripts that comes with the spine-unity runtime, to be helpful. This script contains code that uses coroutines to play animations of a gun being held and holstered at random intervals. In your case, a fixed interval rather than random may be fine, but I think you could quote this script and make a few modifications to achieve what you want to do.
The exact path of this script is as follows:
Spine Examples/Scripts/Getting Started Scripts/Raptor.cs
or Packages/com.esotericsoftware.spine.spine-unity-examples/Scripts/Getting Started Scripts/Raptor.cs
if you installed via Add package from git URL
in Package Manager
.
If I have misunderstood what you want to do, I would appreciate it if you could give us some more details about what approach you have already tried and what it does not accomplish.