Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Tile Map Editor vs game tile sprites

Discussion in '2D Experimental Preview' started by Bmandk, Apr 29, 2019.

  1. Bmandk


    Aug 18, 2012
    I'd like to be able to create tiles that have specific sprites when in the editor, but then change into another tile when I'm in the game. Currently, I tried using Awake() and StartUp() methods to achieve this with a Scriptable Tile, but it seems they're both still called in the editor. Is there already a way to do this?
  2. ChuanXin


    Unity Technologies

    Apr 7, 2015
    You could use the StartUp() method in the Tile and do a check on whether the !Application.IsEditor and Application.IsPlaying to modify the Sprite of the Tiles by calling Tilemap.RefreshTile?

    This should allow you to differentiate the Sprites between Edit mode, Play mode in Editor and Play mode in the built player.