• 日本語
  • UnityのChronosアセットとの使用について

Unityの時間を操作するアセットChronosとの使用について質問があります。

Chronos
https://assetstore.unity.com/packages/tools/particles-effects/chronos-31225

時間を止める操作などができるのですが、Chronos上で時間を止めてもSpineのアニメーションは再生されてしまうようです。

Chronosアセットに対応する予定などありますでしょうか。

一応
this.GetComponent<SkeletonAnimation>().timeScale = StageClock.localTimeScale;

とすれば同期するのはわかるのですが、全てのSpineアニメーションに設定しなくてはいけなく、とても大変です。
もっとよい解決方法があったら教えて下さい。

I have a question about using Unity's time manipulation asset, Chronos.

Chronos
https://assetstore.unity.com/packages/tools/particles-effects/chronos-31225

I can stop time, but even if I stop time on Chronos, the Spine animation still plays.

Is there any plan to support Chronos assets?

In a nutshell
GetComponent<SkeletonAnimation>().timeScale = StageClock.localTimeScale;

I know it will synchronize, but I have to set it for all Spine animations, which is very difficult.
Please let me know if there is a better solution.

Related Discussions
...
12 días más tarde

お返事が遅くなりまして申し訳ありませんでした!

残念ながら、コンパイルされていないコードを追加する必要がある場合、このような汎用的で関連性のないサードパーティの拡張機能のサポートを提供することはできません。もし、コンパイルされないコードを追加する必要があるならば、#if THIRDPARTY_EXTENSION セクションと Spine の環境設定に対応するエントリを追加することで可能になるかもしれませんが、ユーザーが Spine と組み合わせたいと思う可能性のあるすべての拡張機能に追いつくことはできませんし、サードパーティの変更時に互換性を維持することもできません。

このためにソースコードを提供していますので、必要に応じて簡単に修正したり拡張したりすることができます。もし SkeletonAnimation のソースコードを変更したくない場合は、例えば SkeletonAnimaion のサブクラスを作成して、必要なメソッドだけをオーバーライドすることができます。

1つのメソッドだけを呼び出す必要がある場合は、スクリプトを書いて既存の SkeletonAnimation GameObjectにアタッチするのが最も簡単な方法です。これが最も簡単な解決策でしょう。

別の方法として、すべての SkeletonAnimation オブジェクトのレジストリを保持し、SkeletonAnimation 型のすべてのオブジェクトを一度に集めてリストに格納し、それに応じてリスト上のそれぞれの更新時刻コードを呼び出すこともできます。ただし、これは SkeletonAnimation オブジェクトが追加されたり削除されたりしたときにリストを更新しておく必要があります。


Sorry for the late reply!

Unfortunately we cannot offer support for such rather generic unrelated thirdparty extensions, if it requires adding otherwise non-compiling code. While it would be possible by adding#if THIRDPARTY_EXTENSION sections and the corresponding entry in the Spine preferences, we can never keep up with all possible extensions that users might like to combine with Spine, and also maintain compatibility upon thirdparty changes.

We provide the source code for this reason, so it can easily be modified or extended where needed. If you don't want to modify SkeletonAnimation source code, you might for example create a subclass of SkeletonAnimaion and override only the required methods.

If it only needs to call a single method, then the easiest way would be to write a script and attach it to every existing SkeletonAnimation GameObject. This would be the easiest solution.

As an alternative, you could also keep a registry of all SkeletonAnimation objects, gather all objects of type SkeletonAnimation once and store them in a list, and then call the respective update time code on the list accordingly. This however requires to keep the list updated when SkeletonAnimation objects are added or removed.

9 días más tarde

回答ありがおつございます。
SkeletonAnimationのコードを調べて対応してみようと思います。

忙しい中ご対応ありがとうございました。

Thank you very much for your answer.
I will look into the SkeletonAnimation code and try to deal with it.

Thank you very much for your time.

ご理解いただきありがとうございます、コードの変更をご提供できず申し訳ございません。


Thanks for your understanding and sorry that we cannot provide the code changes.