- Home /
Unable To Override A Prefab
So I have an Enemy Prefab in which when I drag and drop my player to a public gameobject in a script attached to that Enemy and try to override it By clicking on apply all. The overrides dont get applied. In the override dropdown It again shows me the Option To Apply All. I have encountered the same problem in the latest 2021 Unity version, I thought It was a bug (Atleast thats what I assumed after Searching some answers on Unity forum) So I changed my Unity version to 2020 LTS & Remaked my game from start. I have come a lot far in the development and till now all the overrides were applying
Answer by Mrpxl · Jun 25, 2021 at 09:00 AM
To apply references to others objects/scripts/components in a prefab, they must be on the gameObject itself or on children of this gameObject. You cannot apply references to objects in scene as they might not be always present around your gameObject
Answer by McCoy487 · Jun 25, 2021 at 11:29 AM
I believe it’s because that’s the global position and that isn’t important for a prefab since it should be given a position upon instantiation. If you want to change the prefabs position you could also go into the prefab editor then manually change its position.
Your answer
Follow this Question
Related Questions
Prefab SerializedProperty weird error, bug? 2 Answers
Prefabs are randomly erased 0 Answers
Assertion failed on expression: 0 Answers
preview of prefabs & materials are turn to red blue color 0 Answers