• 日本語
  • Unityのバージョンアップに伴うSpineエラーについて

Unityのバージョンを
2020.1.8f1から2020.2.7f1
に更新しました。

その結果、下記エラーが出るようになりました。

「spine-unity」が古いのかと思い、
既存の「spine-unity」を完全削除後、「spine-unity 3.8」をインストールしましたが、同じエラーが出ています。

なぜエラーが発生するのか調べていただいてもよろしいでしょうか。
なにか設定をしなくてはいけないものなどありますか?


Unity version.
2020.1.8f1 to 2020.2.7f1
I have updated the Unity version from 2020.1.8f1 to 2020.2.7f1.

As a result, I am getting the following error.

I thought maybe "spine-unity" was outdated.
After completely removing the existing "spine-unity", I installed "spine-unity 3.8", but the same error occurred.

Can you please help me find out why the error occurs?
Is there anything I need to configure?

Related Discussions
...

スパインユニティランタイムをどのようにインストールしましたか? プロジェクト内のどこにありますか?

通常は Assetsディレクトリ内にある場合は、Unityプロジェクトの一部が破損した状態にある可能性があります。 次に、 Libraryディレクトリと、生成されたすべてのVisual Studioファイル(.vsディレクトリ、すべての .csprojファイル、およびobjディレクトリ)を削除してみてください。


How did you install the spine-unity runtime? Where is it located inside your project?

If it's located normally inside the Assets directory, it could be that some part of the Unity project is in a corrupted state. Then you could have a try deleting the Library directory, as well as all generated Visual Studio files: the .vs directory, all .csproj files, and the obj directory.

返信ありがとう。

SpineUnityはAssetsフォルダのすぐ下にあります。
Libraryディレクトリと、生成されたすべてのVisual Studioファイル(.vsディレクトリ、すべての .csprojファイル、およびobjディレクトリ)を削除してみましたが、問題は解決しませんでした。

新しいプロジェクトを作成して同じようにやってみたら、同じバグに遭遇しました。

私は下記をやりました。

Unity(2020.1.8f1)で新しいプロジェクトを作成

spine-unity-3.8-2021-06-23.unitypackageをプロジェクトに反映

Unity(2020.2.7f1)にバージョンアップ

C#の「using Spine」のリンクが切れている

「お問い合わせ」フォームからあなた方に問題の発生したプロジェクトを送信しました。
確認してもらってもよいでしょうか。

Thanks for the reply.

SpineUnity is located just below the Assets folder.
I tried deleting the Library directory and all generated Visual Studio files (.vs directory, all .csproj files, and obj directory), but that didn't solve the problem.

I tried creating a new project and doing the same thing, and encountered the same bug.

I did the following

Create a new project in Unity (2020.1.8f1)

Reflect spine-unity-3.8-2021-06-23.unitypackage in the project
↓ ↓
Upgrade to Unity (2020.2.7f1)

The link for "using Spine" in C# is broken.

I've sent you the project with the problem via the "Contact Us" form.
Can you please check it for me?

再現パッケージを送っていただきありがとうございます。

残念ながら、あなたの手順に従って問題を再現することはできませんでしたが、あなたがインクルードしたUnityプロジェクトをUnity 2020.2.7で開くと、Visual Studioでコンパイルエラーが確認できました。これらのエラーはVisual Studioでのみ発生し、Unityのコンソールウィンドウやゲーム実行ファイルのビルド時には発生しませんでした。

Visual Studioでのコンパイルエラーを修正するために、様々なことを試してみましたが、問題が解決したと思われるものもありましたが、残念ながら完全に論理的ではなく、UnityまたはVisual Studio関連のバグの回避策のように思えました。
ProjectSettings "ディレクトリのバックアップを作成した後、このフォルダを削除しました。その後、UnityHubを開くとバージョンが不明になっていたので、以前と同じUnityのバージョンを選択し、プロジェクトを開くと再インポートが行われました。再インポート後、「Edit - Preferences - External Tools」を選択し、「Embedded Packages」と「Local Packages」だけを有効にして、「Regenerate project files」をクリックしました。その後、「Assets - Open C# Project」を選択してVisual Studioを開き、プロジェクトを再読み込みしました。その後、エラーはなくなりました。その後、ProjectSettingsファイルを再び元の状態に戻しても、エラーは再発しませんでした。

この方法で解決しない場合は、追加でロックファイル packages-lock.json を削除して、すべての Visual Studio ファイル (上記のとおり、.vs ディレクトリ、.sln.csproj など) を削除すると解決するかもしれません。


Thanks for sending the reproduction package.

While unfortunately we could not reproduce the issue by following your steps, we could see the compile errors in Visual Studio when opening your included Unity project in Unity 2020.2.7. We encountered these errors only in Visual Studio, not in the Console window in Unity or when building the game executable.

To fix the compile errors in Visual Studio, we tried many things, some which seem to have solved the issue, unfortunately not completely logical - it seems more like a workaround for a Unity or Visual Studio related bug:
After creating a backup of the ProjectSettings directory, we deleted this folder. Then when opening UnityHub, the version is unknown, then we selected the same Unity version as it was before, then opened the project which led to a reimport. After the reimport was done, we selected Edit - Preferences - External Tools, had only Embedded Packages and Local Packages enabled and hit Regenerate project files. After that we selected Assets - Open C# Project to open Visual Studio and reload the project. After that the errors were gone. After that, the ProjectSettings files could be restored again to their original state without the error re-occurring.

If this does not work for you, maybe additionally deleting the lock file packages-lock.json and deleting all Visual Studio files (as described above, the .vs directory, .sln, .csproj, etc) could help.

解決方法ありがとうございます。
とても参考になります。

また、Spineによるものではなく、VisualStudio依存のバグということで大変失礼しました。

早速試してみようと思います!

Thank you for the solution.
It is very helpful.

Also, I am very sorry to hear that it is not caused by Spine, but a VisualStudio-dependent bug.

I'll give it a try right away!

17 dana kasnije

悔しがる必要はありません。あなたの方でも同じように解決できることを願っています。
No need to be sorry. We hope that it can be resolved the same way on your end as well.


このタイプの問題の潜在的な理由を見つけました。Unityパッケージマネージャーで古い Visual Studio Editorパッケージを使用すると、投稿で説明されている問題が再現される可能性があります。 それでもこのような問題が発生する場合は、Unityパッケージマネージャーを使用して「VisualStudioEditor」パッケージをアップグレードしてから、「アセット-C#プロジェクトを開く」をクリックしてみてください。


I just found a potential reason for this type of problem: when using an older Visual Studio Editor package in the Unity Package Manager, an issue as described by your posting can be reproduced. In case you are still experiencing such issues: could you please have a try upgrading the Visual Studio Editor package via the Unity Package Manager and then hit Assets - Open C# Project?

Thanks for the solution suggestion!
I'll try that right away!
And along with that, I'd like to ask Unity's official about this issue as well!

解決方法の提案、ありがとう!
早速試してみたいと思います!
それと一緒にUnityの公式にもこの問題を聞いてみたいと思います