Scene is changing prefab
Hello everyone, I have somewhat of a strange issue.
When I work on one of my scenes and saving it is updating prefab. This update is producing results that are breaking stuff on the scene. From my testing it appears that when my code updates a clone of the prefab it is keeping that change and when I stop playing and save it retains the change. I can go to other scenes and I don't see it happening.
I have checked to see if checked that I am using Instantiate everywhere. It started after installing odin. I have since removed odin.
Are you absolutely certain that you are modifying the clone and not the prefab, itself? I'm sure you already know this but just calling instantiate isn't enough, you have to make changes to the return value of the instantiate.
Do you have any behaviors that are marked to run in the editor that might be doing this?
Is there any way you can whittle the code down to a subset that reproduces the problem and post the potential culprits?
Thanks for the quick feed back. Here is how i'm instantiating the all my prefabs
var go = (GameObject)Instantiate (Resources.Load ("Abilities/" + asset.abilityPrefab), this.transform);
I will see if I can boil it down to a smaller subset. I think something might be wrong with this scene altogether.
Your answer
Follow this Question
Related Questions
Can't find Animator State/Invalid Layer Index in child object inside prefab 0 Answers
How do I spawn an array of prefab clones as children of an object? 1 Answer
Instantiate a script into an instantiated prefab 3 Answers
If instantiate prefab is selected how can i change the color? 1 Answer
Why does Unity lock the transform of prefabs in my scene in playmode? 0 Answers