Search Issue Tracker
By Design
Votes
0
Found in
2021.3.20f1
2022.2.9f1
2023.1.0b7
2023.2.0a5
Issue ID
UUM-29845
Regression
No
Sprite Renderer on Prefabs instances is not destroyed after exiting Play mode when Sprite Renderer is instantiated from Tilemap
Reproduction steps:
1. Open the attached “Test.zip“ project
2. Open “SampleScene” scene
3. Delete “Tilemap” GameObject and undo the change
4. Observe the Scene window
5. Enter and exit Play mode
6. Observe Scene and Hierarchy windows
Expected result: “Cell” Prefab instance disappears after exiting Play mode
Actual result: “Cell” Prefab instance doesn’t disappear in Scene and Game windows after exiting Play mode
Reproducible with: 2021.3.20f1, 2022.2.9f1, 2023.1.0b7, 2023.2.0a5
Could not test with: 2020.3.46f1 (Due to errors in the Console window)
Reproduced on: macOS Monterey 12.6 (Intel)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Expendable property in Inspector Window collapses when an item is added to the property's list
- Unity Editor Preferences window menu labeled "Settings" on macOS devices
- Default value in the Script is not assigned when applying the UI Toolkit ObjectField
- Private field value assignment via Script is not applied when you enter the Play Mode for the first time after the change
- There is an ability to switch to VisionOS module even though the installation of the module has failed
Resolution Note:
When the scene is loaded with the Tilemap, we will instantiate the GameObject for each Tile on the Tilemap, but hide it in the Hierarchy window. This will help the user visualize the instantiated GameObject while the user is editing the scene.
When entering PlayMode, the GameObjects are instantiated to their defaults and shown in the Hierarchy window. This allows the user to interact and debug the instantiated GameObjects as their game is player.
When leaving PlayMode, these GameObjects are destroyed. They are then instantiated again and hidden in the Hierarchy window, just like when the user loaded the scene, for the visualisation reasons.