Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    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:
    118
    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:
    118
    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:
    50
    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:
    118
    Thanks,

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