Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

[Bug] Tilemap Generation 0.14.1

Discussion in 'Project Tiny' started by vincismurf, Feb 1, 2019.

  1. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    126
    I just Updated my game ( functional version http://afterschoolcartoons.com/Games/Tiny/SmugglersRun/bin/ )

    One of it's key feature is dynamically building the tilemap at runtime. My SceneGroup had several empty tilemaps which I populate when the Behaviors are enabled.

    After updating to 0.14.1 I no longer have a tilemap with tiles when I build. The console doesn't report an error. Any idea on what changed and how to fix it?

    Note General logic goes as such

    Code (JavaScript):
    1.  
    2. //Clear Existing Tiles
    3. tilemap.tiles = [];
    4.  
    5. //later generate some new tile data
    6. let tileData = new ut.Tilemap2D.TileData();
    7. tileData.position = new Vector2(x, y);
    8. tileData.tile = tile;
    9.  
    10. //Add new tiles data to tilemap
    11. tilemap.tiles.push(tileData);
    12. //repeat for each tile
    13.  
    14. //tell the system to update
    15. let rechunk:ut.Tilemap2D.TilemapRechunk = new ut.Tilemap2D.TilemapRechunk();
    16. this.world.setOrAddComponentData( this.data.entity, rechunk);
    17.  
    18.  


    Interestingly it thinks there are tiles in the map they just aren't rendering

    Tile count pre 74
    Tile count post 31899

    Thanks
     
    Last edited: Feb 5, 2019
  2. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    126
    Bump. Just want to make sure the Devs see this. Please let me know if API logic has changed or if this is a bug
     
    Last edited: Feb 5, 2019
  3. raymondyunity

    raymondyunity

    Unity Technologies

    Joined:
    Apr 30, 2018
    Posts:
    80
    The API logic involving tilemaps has not changed. Runtime was not touched in the previous version. If the problem persists I would recommend downgrading.
     
  4. vincismurf

    vincismurf

    Joined:
    Feb 28, 2013
    Posts:
    126
    Thanks,

    I am keeping it at the same version until c#
     
    raymondyunity likes this.