ultrafop

Hey, I'm running Unity 2019.1.0.1f and trying the newest version of the Spine package 3.8. I've never used the product before so I'm not upgrading from an earlier version.

I'm receiving this message:
Assets/Spine/Runtime/spine-unity/Asset Types/SkeletonDataAsset.cs(45,10): error CS0246: The type or namespace name 'tk2dSpriteCollectionData' could not be found (are you missing a using directive or an assembly reference?)


I saw some other posts that had a similar message, requiring files to be renamed. I tried this but that did not fix the issue. Any help is appreciated!
ultrafop
  • Сообщения: 10

badlogic

Are you using the third party TK2D asset? The type tk2dSpriteCollectionData is provided by that asset and must be part of your project if you want to use it.

If you are not using TK2D, please make sure it is disabled in your preferences as outlined here spine-unity Runtime Documentation: Enabling Compatibility with 2D Toolkit
Аватара пользователя
badlogic

Mario
  • Сообщения: 2127

ultrafop

badlogic писал(а):Are you using the third party TK2D asset? The type tk2dSpriteCollectionData is provided by that asset and must be part of your project if you want to use it.

If you are not using TK2D, please make sure it is disabled in your preferences as outlined here http://esotericsoftware.com/spine-unity#Enabling-Compatibility-with-2D-Toolkit
I don't have that asset. Admittedly though I enabled that after installing previously because I tend to tinker and didn't know what it did.So that's probably it! I'm thinking this means I have to completely remove everything from the directory, which I thought I did? Maybe there's a file that remembers that preference? Is there a complete directory list you could point me to to make sure I get rid of everything?

Thank you for your help!!
ultrafop
  • Сообщения: 10

badlogic

I don't think you have to disable anything. Just disable TK2D support in the preferences as per the docs I linked to in my last reply. If that doesn't work we have to dig deeper :)
Аватара пользователя
badlogic

Mario
  • Сообщения: 2127

ultrafop

I would but now, even on fresh imports of the package, Spine does not show up in the Preferences area. :/
ultrafop
  • Сообщения: 10

badlogic

Oh my, looks like Unity doesn't like you this week :) Do you see any errors in the Unity log relating to Spine related things not loading properly?
Аватара пользователя
badlogic

Mario
  • Сообщения: 2127

Harald

We are sorry for the troubles!

When enabling TK2D support accidentally and closing the Unity Editor, the cat bites it's tail, as the Preferences menu is gone when closing Unity and only reappears when no compile errors are left.

A solution is to manually remove the SPINE_TK2D defines from the ProjectSettings file:
ProjectSettings/ProjectSettings.asset
and perhaps also from
Library/ProjectSettings.asset
Just open it with a text editor and edit it accordingly.

The relevant section looks like this:
scriptingDefineSymbols:
1: SPINE_TK2D
Аватара пользователя
Harald

Harri
  • Сообщения: 1116

ultrafop

Hey! So this helped to get the game running again but I still don't see the Spine tab in the project settings area, even after removing and re-importing it. Should I delete everything under the "scriptingDefineSymbols" regardless of whether it says "TK2D"? I only took out the TK2D stuff in case those other lines were important/
ultrafop
  • Сообщения: 10

Harald

Does it still not compile successfully, do you still receive errors in the console? Once it compiles, you should see the Spine menu entry in Preferences. Please always post any error messages you receive, so that we can save time diagnosing your problem.

What other scriptingDefineSymbols do you have listed? you can post the section with some lines above and below the scriptingDefineSymbols section.
In general, the other defines shall stay as they are, it's just the SPINE_TK2D define that should create compile problems in your case.
Did you remove the defines from both files?
Аватара пользователя
Harald

Harri
  • Сообщения: 1116

ultrafop

Sorry for taking so long to follow up on my own issue. I started a new job recently and it's been taking up a lot of my mental space. I booted everything up to get screen grabs annnnnd... now it works? No idea what changed since the last boot but your instructions seemed to have worked! The Spine menu is there!

Thank you both for all of your help and for your patience in assisting me!
ultrafop
  • Сообщения: 10

Harald

Glad to hear that it works now, thanks for getting back to us!
Аватара пользователя
Harald

Harri
  • Сообщения: 1116

Eugene

Hi!
I have the same problem.
But I can’t edit the ProjectSettings.asset file - it has a non-text view.
Can you advise something?
Eugene
  • Сообщения: 4

Harald

You should be able to switch asset serialization from binary mode to text mode via Edit - Project Settings - Editor, then in the Editor Settings window switching Asset Serialization - Mode from Mixed to Force Text. Then you should receive a human-readable and editable ProjectSettings.asset file.
Аватара пользователя
Harald

Harri
  • Сообщения: 1116

Eugene

Thank. Your advice really helped
Eugene
  • Сообщения: 4


Вернуться в Bugs