Unity Issue Tracker - Script doesn't execute when entering the Play Mode until the GameObject with the Script Component is selected in the Hierarchy window
Closed
UUM-33653
Script doesn't execute when entering the Play Mode until the GameObject with the Script Component is selected in the Hierarchy window
Unity: Scripting
Third Party Issue
2023.1.X
2022.2.X
2021.3.X
This seems to be a user-code issue: the only code paths awaking the PathCreator come from the PathSceneToolEditor object. So until this object is created (by inspecting the Path game object) nothing happens.
Reproduction steps:
1. Open the attached “3D tile.zip” project
2. Open the “Assets/Scenes/Level-1.unity” Scene
3. Enter the Play Mode
4. Observe the Game View
5. Select the “Path” GameObject located under the “TrackWrapper” GameObject in the Hierarchy widow
6. Observe the Game View
Expected result: The “Path Creator” Script is active and running once in the Play Mode
Actual result: The “Path Creator” Script only becomes active and execute once the “Path” GameObject has been selected