Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

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.