Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Question prafabs in rule tile

Discussion in '2D' started by MimiKitty, Oct 1, 2022.

  1. MimiKitty

    MimiKitty

    Joined:
    Dec 13, 2018
    Posts:
    20
    I know that when you use a rule tile, the tiles on the tilemap don't individually exist, but if you use a prefab on them as well, the instantiated prefabs do seem to exist, but they are not in the hierarchy

    where are they? you can click on them individually. they do have their own components. I am not sure how functional they are.

    is there some way to make them actually appear in the hierarchy? it feels very jank as it is now
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,780
    i can't speak to prefabs vs not prefabs, but Tiles are not GameObjects, so they would never appear "in the hierarchy," which of course is ONLY GameObjects, nothing else.

    Tiles are ScriptableObjects, eg, assets that can exist on disk, and they get slotted into squares of a TileMap, which is a Component that goes on a GameObject.
     
  3. MimiKitty

    MimiKitty

    Joined:
    Dec 13, 2018
    Posts:
    20
    when you make a rule tile you can choose a gameobject for it to instantiate with the tile.

    I solved my own issue, someone please close and delete thread

    joking, posting the answer if anyone searches for it. the gameobjects do not exist in the hierarchy in the editor. in play mode these game objects will exist in the hierarchy normally! I don't know why it's like this but that's how it is
     
    Last edited: Oct 2, 2022
  4. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    This is done in the Editor to ensure that when you save the Scene, these GameObjects are not saved as well. If it was saved, then you would get duplicates of those each time you loaded the Scene.