Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. The 2022.2 beta is now available for testing. To find out what's new, have a look at our 2022.2 feature highlights.
    Dismiss Notice
Dismiss Notice
Submit bug reports tagged with #Beta2022Win_Unity when you encounter unknown issues while testing the 2022.2 betas for a chance to win a year of Unity Pro. For more information, have a look at our Beta Sweepstakes Announcement.

2D Experimental Preview Release 4 Breaking Changes

Discussion in '2D Experimental Preview' started by ChrisJohnson, May 9, 2017.

  1. ChrisJohnson

    ChrisJohnson

    Joined:
    Feb 20, 2013
    Posts:
    56
    Hello, Thank you for all the work that you guys have done with the 2D Experimental Preview so far.

    But I just updated a project from Experimental Preview Release 3 to Experimental Preview Release 4. I backed up the project first. But in the new version my tilemaps, tilesets, and tile palettes are all completely broken. I think the reason might because you changed the component ids, and names. Also in the scene the tilemap component has been replaced by a video player component, and I think the tile grid has been replaced by a sprite mask.

    I was wondering if there is an easy way that I could fix this without remaking the tilemaps from scratch. Because this would be a lot of work.

    Thanks alot,
    Chris Johnson
     
  2. Johaness_Reuben

    Johaness_Reuben

    Unity Technologies

    Joined:
    Jan 27, 2016
    Posts:
    253
    One of the guys made some Python scripts to help "upgrade" the project files.

    Update guide for serialization
    • Before updating to this preview, change the asset serialization method for your projects to Force Text and save your project. - Edit/EditorSettings/Asset Serialization
    • Make a backup of your project
    • Download the attached PythonScripts.zip
    • Install Python
    • Run classtm.py in your project's assets folder to update the Ids for your Tilemap components
    • Run classtile.py in your project's assets or tiles folder to update your Tile assets
    I have not tried it myself. Hopefully this helps in some way.
     

    Attached Files:

  3. ChrisJohnson

    ChrisJohnson

    Joined:
    Feb 20, 2013
    Posts:
    56
    Thanks, I'll give it a try and tell you if it worked or not.
     
  4. ChrisJohnson

    ChrisJohnson

    Joined:
    Feb 20, 2013
    Posts:
    56
    That python script fixed the tilemap, but in the editor palette tab one of my tile palettes is missing, and the other one doesn’t work. Here is an error that I get in editor.

    GridPalette subasset not found from: Assets/Tile Palettes/Yellow.prefab
    UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr)


    I also keep getting this error when I click on the drop down menu where you can pick your tile palette in the editor.

    Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
     
    Last edited: May 9, 2017
  5. ChrisJohnson

    ChrisJohnson

    Joined:
    Feb 20, 2013
    Posts:
    56
    I sort of fixed the tile palettes now. It looks like the tile palette prefabs needed this piece of code in them.

    --- !u!114 &114230327204373143
    MonoBehaviour:
    m_ObjectHideFlags: 0
    m_PrefabParentObject: {fileID: 0}
    m_PrefabInternal: {fileID: 0}
    m_GameObject: {fileID: 0}
    m_Enabled: 1
    m_EditorHideFlags: 1
    m_Script: {fileID: 12395, guid: 0000000000000000e000000000000000, type: 0}
    m_Name: Palette Settings
    m_EditorClassIdentifier:
    cellSizing: 0


    Also I think that this id should be different for every tile palette prefab “114230327204373143”


    But I still keep getting this warning all the time in the editor.

    Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
     
  6. ChrisJohnson

    ChrisJohnson

    Joined:
    Feb 20, 2013
    Posts:
    56
    Ok, I some how got rid of that Internal: JobTempAlloc warning now. I’m not really sure why it went away. All I did was change the Tilemap Renderer’s mode from individual to chunk, and saved the scene. It might of just been that the scene needed to be resaved I’m not sure. But it looks like everything is working now for the most part except a few minor bugs that should be easy to fix.

    Thanks Johaness_Reuben for the help with that python script, hopefully there won't be any more major issues.
     
    Last edited: May 10, 2017
    der_r likes this.
  7. zephyr831125

    zephyr831125

    Joined:
    Mar 4, 2017
    Posts:
    54
    Hi, I runned the two pys and they all got same error:

    File "classtile.py", line 8
    if (str(file).endswith(".asset")):
    ^
    TabError: inconsistent use of tabs and spaces in indentation

    Maybe because I'm using python 3?
     
  8. ChrisJohnson

    ChrisJohnson

    Joined:
    Feb 20, 2013
    Posts:
    56
    Yeah, if I remember correctly I think I had to use python 2.
     
unityunity