• RuntimesUnity
  • Saved obj with spine animation crashes when reloading unity

I have an object with attached spine animation. If save it with serialization in json file and reopen unity it disappear from data with "type mismatch" error. If i delete spine animation from obj everything works fine also while i inside unity it works with no problem. Please somebody help, I've broken my head with this problem.

  • Harald ответили на это сообщение.
    Related Discussions
    ...

    AleksanderLevik If save it with serialization in json file and reopen unity it disappear from data with "type mismatch" error.

    Sorry to hear you're having troubles. Could you please describe what you mean by you "save it with serialization in json file"? Do you mean you re-export your skeleton in json format?

    What exact error message do you receive? Please always share the full Log window error message, including the stack trace.

    Hello. This is how i save data

    So i save scriptable object with prefab which contains skeleton graphic

    Everithing works fine while i in unity

    But if i reopen it i have null ref error because of this

    • Harald ответили на это сообщение.

      AleksanderLevik Hello. This is how i save data

      Thanks for the additional information. Unfortunately most of classes in the screenshot are unknown to me, these seem to be from your own or a thirdparty serialization library. Without additional information, it's impossible to diagnose the issue, and it's especially hard when posting code as a screenshot and not as text. You can use three backticks ``` before and after code to format code blocks:

      void yourMethod () {
          int number;
      }

      If you can create a minimal Unity project which shows this issue, we can have a look at it. E.g. create just a minimal scene or prefab which is serialized to json which shows this issue, without any game logic. And describe the necessary steps to be performed to reproduce the issue. You can send it as a zip package to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context.