-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to remove Components and Children from Prefabs #101
Comments
Solution Idea:
|
It can be done though. If you remove a component, break the prefab, remove the old prefab in the project view and replace it with the new object sharing the same name it actually works. But kind of a pain though... |
You don't need to remove the old Prefab though. Just DragDrop the new object onto it and it will be replaced and linked. The most annoying part of the problem remains though: All your Prefab instances scattered across different Scenes will still retain their additional Component - it won't be removed by applying the new Prefab, because applying Prefabs only ever adds Components and child objects, but never removes them. |
Why not have the ObjectInspector display what Components and Children the Prefab has, and allow the user to alter them? |
This is a nice addition in itself, but it doesn't solve the fundamental problem of the Prefab system in Duality working in an additive way:
This core problem needs to be addressed to make Component and child object removal on Prefabs possible. That said, making Prefabs editable in the object inspector directly is definitely a cool feature. I kind of have this on my list, but it's not a fast-and-easy addition because of various dependencies. |
I have met the same question here. I tried to remove a component in the prefab. But Destroy() or DestroyImmediate() didn't work. Why addComponent<>() works well . But there's no removeComponent<>() function here? |
Come up with a way on how to handle this and allow users to update their Prefabs accordingly.
The text was updated successfully, but these errors were encountered: