Rule Tile "GameObject" duplicating in build version

Hi all!

We’re currently developing a Rogue-like 2.5 Doom-like game and we ran into some issues with the GameObject associated with Rule Tile.

We currently use the Rule Tile feature mixed with Tilemap to be able to easily draw new rooms that will be randomly placed in a dungeon-like pattern (think something like Binding of Isaac) whenever the player start said dungeon. This allows us to have all of our terrain objects and enemies in a Tile Palette, and easily draw whatever we want the player to experience as a challenge. This works great, as long as the game is running in the Editor.

When the game is Build, the GameObject are duplicated and all placed at the same (0,0,0) coordinate of the room. I’ve done some testing, and it seems to only happen for rooms that aren’t already placed in the scene, which in our case is basically all the rooms (we instantiate the layout of the dungeon when the scene is loaded).

Here’s some screenshots to get a better idea.

Here you can see 4 explosive barrels in the editor version of the room

Here you can see the same 4 barrels plus 4 duplicated ones that are stack on top of each other as they all tried to spawn at the same place in the build version of the room

Has anyone ever encountered something like this, or used the Rule Tile like that?
I’ve done some testing, but I’m not sure where to go from here to solve this.


We have the same problem! We’ve been working on this bug for a few days now, very infuriating.

I would also be interested in an aswer, if anyone has one to share.
I have the same issue.

I encountered the same issue and reported it as a bug to Unity. They were able to reproduce it and have added it to the issue tracker

A pretty hacky workaround that I’ve been using is checking the local position of the object, if it is at 0,0 it will destroy itself on Awake