Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Tilemap error -> There is no 'Tilemap' attached to the "Entity" game object

Discussion in 'Project Tiny' started by banyango, Dec 17, 2018.

  1. banyango

    banyango

    Joined:
    Mar 31, 2014
    Posts:
    19
    Hey I was getting an error when trying to add a Tilemap

    MissingComponentException: There is no 'Tilemap' attached to the "Entity" game object, but a script is trying to access it.
    You probably need to add a Tilemap to the game object "Entity". Or your script needs to check if the component is attached before using it.

    This didn't really make sense to me as I was adding a Tilemap (tinytilemap) to an entity.

    I dug through the code and noticed that the TilemapBinding only runs when an entity has both a TransformNode and Tilemap component.

    I might suggest RequireComponent(TransformNode) on TinyTilemap? if that's even possible. (I haven't dug that far into the code) As I didn't quite realize that I needed a TransformNode.

    Anyways, if anyone else runs into this error. Make sure your Tilemap has a TransformNode.
     
  2. MadhurUnity

    MadhurUnity

    Unity Technologies

    Joined:
    May 30, 2017
    Posts:
    2
    Yes, Tilemap requires all three types position, rotation and scale for it to work.