- Home /
Need to edit a certain prefab that's only appears in the hierarchy during playmode. Help?
I'm editing this pre-made racing game, and I'm wanting to change the appearance of the player's car. However I'm unable to do so because the scene where the actual race happens doesn't show the player's car (or any of the AI cars) in the hierarchy, unless I start from the menu-screen scene and launch the race scene in playmode from there. When I launch out of playmode I automatically get sent back to the main menu scene. I obviously can't can't edit the car in playmode since it just reverts back to the way it was before. I tried googling to see if there's any way to save the project while in playmode, but nothing. Is there any way to get around this? (Btw I have no knowledge in C#. I rely on tutorials to get by, so a detailed step-by-step answer would be really appreciated!)
Answer by Legend_Bacon · Nov 09, 2018 at 10:07 AM
Hello there,
If you go to the racing scene in the editor, you should be able to drop the car onto the scene, edit it, and then save it.
How does the game place the cars onto the tracks? I am guessing it instantiates a prefab, right?
Locate that prefab in the project, then drag it onto the scene. Edit it as much as you want, then at the top of the inspector, hit "apply".
Now the game will instantiate your edited version of the car.
Hope that helps!
Cheers,
~LegendBacon
Your answer
Follow this Question
Related Questions
Can't remove GameObject from scene in editor (Not appear in heirarchy, not selectable, Ghost object) 2 Answers
How to return my variable from the coroutine ?? 1 Answer
How to handle GhostObjects(Not appear in heirarchy, not selectable)? 1 Answer
How to retarget animation to another (faulty?) character model 1 Answer
which one of the panels in unity has effect on the size of the project? 0 Answers