0 支持
173 閲覧
(240 ポイント) Q&A
お世話になっております。

SpriteStudio 6 Player for UnityをAssetStoreからUnityへImportした際に以下のようなエラーがでており困っています。

Assets\SpriteStudio6\Editor\Import\SSAE.cs(6321,58): error CS1503: Argument 2: cannot convert from 'AnimationEvent[]' to 'UnityEngine.AnimationEvent[]'

Assets\SpriteStudio6\Editor\Import\SSAE.cs(8436,24): error CS1061: 'AnimationEvent' does not contain a definition for 'time' and no accessible extension method 'time' accepting a first argument of type 'AnimationEvent' could be found (are you missing a using directive or an assembly reference?)

Assets\SpriteStudio6\Editor\Import\SSAE.cs(8437,24): error CS1061: 'AnimationEvent' does not contain a definition for 'intParameter' and no accessible extension method 'intParameter' accepting a first argument of type 'AnimationEvent' could be found (are you missing a using directive or an assembly reference?)

Assets\SpriteStudio6\Editor\Import\SSAE.cs(8438,24): error CS1061: 'AnimationEvent' does not contain a definition for 'functionName' and no accessible extension method 'functionName' accepting a first argument of type 'AnimationEvent' could be found (are you missing a using directive or an assembly reference?)

これらの対処方法がわからず困っているのでご助言いただけると助かります。

ちなみにUnityのバージョンは2019.4.18.f1Personalです。
このページをシェアする

回答 1

0 支持
(4.9k ポイント)

うみつき 様

お世話になっております。SS6Player for Unity開発担当です。

上記のエラーは、恐らく、お手元のプロジェクトに入っている他のアセットなどで、すでに「AnimationEvent」をオーバーライドしているものが存在しているために……UnityがSS6Player for Unityのコンパイル時に「AnimationEvent」クラスを発見できなくなって、起こっている可能性が高いかと思われます。

ですので、大変お手数とは存じますが……お手元のプロジェクトで

Assets/SpriteStudio6/Editor/Import/SSAE.cs

をテキストエディタ(Visual StudioやMonoDevelopなど)で開いていただき、

5844行目の記述を

List<AnimationEvent> listAnimationEvent = new List<AnimationEvent>();

から
List<UnityEngine.AnimationEvent> listAnimationEvent = new List<UnityEngine.AnimationEvent>();
に修正。
同様に、
8406行目を
List<UnityEngine.AnimationEvent> listAnimationEvent,
8423行目を
UnityEngine.AnimationEvent animationEvent = new 
UnityEngine.AnimationEvent();
……に変更してみて頂けないでしょうか?
※全ての行で、「AnimationEvent」を「UnityEngine.AnimationEvent」に変更(前に「UnityEngine.」を追加するだけです)

お忙しい中、お手数とは存じますが、何卒ご検討とご検証の程よろしくお願いいたします。

※現在SS6Player for Unityの最新版が(GitHub公開だと)2.0系に更新されていることもあり1.1.32を直接更新することができないこともあって、ご面倒をおかけして申し訳ありません。

何卒今後ともよろしくお願いいたします。

(240 ポイント)

ご回答ありがとうございました。

>上記のエラーは、恐らく、お手元のプロジェクトに入っている他のアセットなどで、すでに「AnimationEvent」をオーバーライドしているものが存在している

こちらを参考にプロジェクト内のAnimationEventクラスの名前を変更したらエラーが出なくなりました。

大変助かりました!ありがとうございました!

...