- Home /
Prefab connection permanently broken for this scene
Hey all,
So I have a prefab that I am editing and 2 scenes. In one scene it works normally. It's highlighted blue, and all changes applied to it are applied to the prefab. But in another scene it is white in the object hierarchy (connection broken). If I delete the object and drag the prefab into the scene again it is created as an object that already has it's connection broken. Clicking the revert button also has no effect. Any ideas what went wrong here?
Actually I now figured out that it won't let me create new prefabs in any scene. I can duplicate the already created prefab and it will maintain the connection. But if this prefab is dragged from project view into the scene the link will be broken instantly. Other prefabs in the project seem to work okay.
Something else that is happening that may or may not have anything to do with this problem is. When I save a scene. It saves then instantly I get the * meaning it is unsaved, without me making any changes. I'm assuming this has to do with it being part of a SVN repo.
Thanks
Do you have any scripts that have the attribute "ExecuteInEdit$$anonymous$$ode" or any editor scripts that are messing with objects in the scene?
Hey Bunny, It seems that some of the scripts NGUI uses has that attrib and this prefab is using NGUI objects. But it actually randomly fixed. I have no idea why it works now but I will describe what I did anyways.
I made no changes to scripts. I was basically at the point where I was like "I guess I will just re add it to every scene after a change is made". So I went to my 2nd scene. Dropped it in (connection broken instantly still).
Then I had one more thought, I moved the prefab to another folder. Deleted the newly created object in my scene and tried dragging it in from that folder. Same thing, so I deleted it from the folder and the scene.
Had another idea. Created a empty game object and tried holding ctrl+click prefab>drag onto empty GO. It created it as a child, still broken. Tried again holding alt+click. Created another child, still broken. Deleted this GO.
Dragged the original prefab back into the scene. I'd given up at this point and was just going to test if it worked with every scene having a prefab. Connection still broken.
Play game>load new scene. notice that for some reason my prefab had children duplicated. Stop game. Look at prefab object in scene. It still has the duplicated children. I switch scenes back to my first scene where there is a GO of this prefab that IS still connected (this isn't something new, for some reason this one GO is connected, but if it gets deleted u can't add a new one that will stay connected). For some reason this GO that is connected also has the duplicates, meaning the actual prefab was changed to have these somehow.
So I just delete the duplicates and apply/save. Load up broken scene 2 again. Delete the old GO prefab there that has a broken connection. Drag prefab from project view. It keeps the connection. YAY PROGRA$$anonymous$$$$anonymous$$ING -_-
Oh one more thing. That little * meaning you need to save is also gone now too. I still have internet and just committed to SVN so I have no idea what the hell is going on at this point.
Answer by FairGamesProductions · Nov 06, 2014 at 10:46 PM
When you select the object in the second scene (where the connection is broken), you'll notice that in the properties window (right under the name) you have some buttons (only appear for prefabs). You need to click on Revert. That will re-load the prefab and restore the connection with the modified prefab from the other scene.
Hey, sorry I forgot to mention in my question. I tried this and it doesn't do anything.
Ever figure this out? I was starting a new scene using some assets I created in an old project and for whatever reason one of my instances of a prefab won't turn blue and says it's broken, even after dragging it freshly into the scene or hitting revert.
Did you ever figure this out? Getting the same exact behavior... reverting does nothing, and dragging it fresh doesn't either! Seems permanently broken :/