Search Unity

Binary to YAML conversion: type unsigned int is unsupported etc.

Discussion in 'Editor & General Support' started by junctionboss, Jan 25, 2015.

  1. junctionboss

    junctionboss

    Joined:
    May 11, 2014
    Posts:
    249
    I get this when trying to save current level, any idea what would cause this ?

    I just got done uninstalling and reinstalling unity trying to fix errors and now this ;(

    I also can't get the camera to rotate around or up/down ,as moving mouse does nothing , - isn't that suppose to work in 3rd person camera script which obviously is in the scene , if not how do I add it ?

    Also when running level I get this too: The referenced script on this Behaviour is missing! < and it as you can see, does not mention what on earth its referring to, any idea on that too ? ;)

    I got everything else working but these few things so it would be nice to get things rolling ;)

    Cheers
    jb
     
    Last edited: Jan 25, 2015
  2. junctionboss

    junctionboss

    Joined:
    May 11, 2014
    Posts:
    249
    Any idea, I"ve never seen this error before and I'd like to get past it in case its something to be concerned about or is preventing things from working right ;)
     
  3. nyonge

    nyonge

    Joined:
    Jul 11, 2013
    Posts:
    49
    I'm running into the same error, notably just after upgrading to Unity 5 beta version b18, 64-bit. It doesn't seem to be breaking anything but it produces 3 errors every time I save - profoundly annoying.

    Anyone know what the deal is?
     
  4. junctionboss

    junctionboss

    Joined:
    May 11, 2014
    Posts:
    249
    WOw, well glad to know I guess, its not just me. Thanks for update! ;)

    Cheers
    jb
     
  5. TwoWholeWorms

    TwoWholeWorms

    Joined:
    Jun 28, 2013
    Posts:
    25
    YAML doesn't have any way to distinguish between a signed integer (one that can represent a number between −2,147,483,648 and 2,147,483,648) and an unsigned integer (one that can represent a number between 0 and 4,294,967,295).

    At a guess, this is being thrown up because Unity 5 now uses unsigned integers to represent some data which was previously signed, or not present, in previous versions. You can probably ignore it, but it might cause some strange errors if your assets contain any numbers greater than 2,147,483,648. Unless you specifically need text-serialised assets, you might want to switch to using mixed serialisation, as binary serialisation doesn't suffer from this sort of error.
     
    Bluewings26 and gresolio like this.
  6. junctionboss

    junctionboss

    Joined:
    May 11, 2014
    Posts:
    249
    That's fine, but if they can code something in favor of new standards, can't they just add in a if statement to no confuse others who are still using say 4.6 or certain assets that might trigger it, that's their assets may need to be looked at to avoid corruption ?

    I think its always better to er on the side of caution instead of perpetrating confusion.
     
  7. Luckymouse

    Luckymouse

    Joined:
    Jan 31, 2010
    Posts:
    484
    When I exported an unitypackage, and import it to other project in Unity 5, then I got the same error:
    Code (CSharp):
    1. Binary to YAML conversion: type unsigned int is unsupported
    2. Binary to YAML conversion: type UInt16 is unsupported
    Even it seems not harmful, but very annoying.

    Maybe I have a code like this cause the error?
    Code (CSharp):
    1. mesh.bounds = newBounds ( Vector3.zero, Vector3.one * 2e9f);
    I try to make sure all my numbers less than 2,147,483,648. but still got that error, any idea?

    [Edit - Solve? maybe]
    I think this error will occur when the project upgrade from 4 to 5.
    When I create a new project in Unity 5 and import my unity package, no more that error.
     
    Last edited: Mar 6, 2015
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Has anyone come up with a solution to prevent or address this?

    I have a package that has a large number of scenes, prefabs, and ScriptableObjects that were made in Unity 4.x.

    I imported the package into a Unity 5.0.1 project with Mixed serialization, and the assets are all fine. I then exported this as a native Unity 5 package.

    If I import this native Unity 5 package with Mixed serialization, all the serialization is fine. I can then switch to Force Binary or Force Text afterward, and it's still fine.

    However, if I set Force Binary or (worse) Force Text before importing the package, a lot of serialization is broken, and Unity reports the same "Binary to YAML conversion: type unsigned int is unsupported" as above.

    Now, if I import in Mixed mode, switch to Force Text, and export a new package, I can import that new package in a new project that's set to Force Text or Mixed mode, but not Force Binary. Similarly, if I export Force Binary, I can import into a new project in Force Binary or Mixed, but not Force Text.

    Any suggestions?
     
    NevaCross likes this.
  9. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    @TonyLi Did you even find a solution to this problem? I am experiencing it with an asset I bought from the asset store.
     
  10. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    No, only the workaround of switching to Mixed mode before importing, then switching back to Force Text afterward.

    I get the feeling Unity just expects developers to rebuild all their scenes and prefabs from scratch in Unity 5.
     
  11. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    Thanks
     
  12. exltus

    exltus

    Joined:
    Oct 10, 2015
    Posts:
    58
    So no solution? It gives me hundred errores everytime I reimport assets :(
     
  13. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Have you switched to Mixed mode?

    Another workaround is to get Unity 5-compatible assets from developers; or import the assets in a Unity 4 project, change the Unity 4 project to Force Text, and export them as a unitypackage. Then import the unitypackage into your Unity 5 project.
     
  14. Zireael07

    Zireael07

    Joined:
    Apr 27, 2016
    Posts:
    47
    I have this problem when trying to import a specific store asset. Is there a way to work around this while still having forced text serialization (I work with git so the need for text serialization).
     
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    If you can't temporarily switch to Mixed just for the import, then create a new Mixed project, preferably in Unity 4.x. Import the asset in this project, switch to Force Text, and export the asset as a unitypackage. Then import it into your main project. This won't include ProjectSettings, but you probably don't want to overwrite those in your main project anyway.

    Or contact the developer and ask them to fix their asset.
     
    Zireael07 likes this.
  16. Zireael07

    Zireael07

    Joined:
    Apr 27, 2016
    Posts:
    47
    Thanks for the tip - I will attempt to import/export it while waiting to hear back from the developer :)