【Verse】アニメーションシーケンスがクラス参照だと再生されない

私は、ムービーシーケンスを使ってアニメーションを実装しようと考えています。

多数のアニメーションを実装したいため、ムービーシーケンス専用のクラス、Sleep1animを作成しました。

しかし、Sleep1animクラスからAnim1にインスタンス化し、インスタンスを介してSleep1animのシーケンスでPlay()を実行しても、ムービーシーケンスが再生されません。

親クラスであるSleepAnimManagerに直接ムービーシーケンスを定義すると、問題なく再生されます。

(Anim1.InSleep.Play()より先のコードはいったん仮に記入した部分なので気にしないでください)

クラスを介してムービーシーケンスを再生する方法について、ご存知の方がおられましたら手順をお聞きしたいです。

Hi and welcome to the forums.
I translated to English, but I believe the problem you have it’s related that you instantiate a class and try to use it but this class will have “empty” values so no animations is going to play.
If you call Anim instead of Anim1 it should work as you intend.

1 Like

Thanks for your post. It worked correctly after I switched to Anim. As you said, the problem was that I was recreating the instance.

So, if I define it within the class, instantiation isn’t necessary, right? It was a small mistake, but thank you for fixing it.

1 Like

No worries, yeah if you have a class defined as concrete in the device, it will show in the editor if you add @editable to it, this allows you to set the animations or fields that you want to expose to it. When you instantiate some concrete class, it’s going to create a new one with the default values in it, not the editor ones.