Jump to content
cfc

Conflict between ProBuilder and Nested Prefabs

Recommended Posts

Tool: ProBuilder Advanced

Issue: ProBuilder seems to conflict with Visual Design Cafe's excellent Nested Prefabs. When creating nested prefabs from ProBuilder objects, some property changes cannot be applied to the prefab.

Steps to recreate:

  1. Add ProBuilder Advanced and Nested Prefabs to project.
  2. Create an object using ProBuilder. Make it a prefab (we'll call this Prefab A).
  3. Create a second object using ProBuilder. Add Prefab A as a child of it. Make the whole thing a prefab (Prefab B).
  4. Change a property on an instance of Prefab A (MeshRenderer Material and SphereCollider radius are two that I've specifically seen issues with). Hit the Apply button to apply these changes back to the prefab.

What should happen: The change should be applied to all instances of Prefab A, including those nested inside Prefab B.

What actually happens: Pressing the Apply button behaves as if I had pressed the Revert button instead. Changes to the prefab instance are wiped out, reverting back to what was previously saved.

What causes this issue: I initially brought this issue up with the Nested Prefabs developer on their Unity forum thread (my initial comment, and replies: Visual Design Cafe, me, VDC, me, VDC). In that last reply, you'll see VDC suggests "it might be caused by a small conflict in the way ProBuilder and Nested Prefabs handle things. For example, ProBuilder will automatically update/change the size of colliders unless the 'Custom Collider' property is enabled. The material is also changed automatically based on the Entity Type. It is possible that ProBuilder already updates those properties when Nested Prefabs has not yet copied over all data, resulting in the wrong data being saved. I'll look into it further, but it might be hard to find the exact cause of the issue without the source code of ProBuilder."

I suspect this is an issue that could be easily addressed with a little information exchange between ProCore and Visual Design Cafe. While I understand not every third-party asset can be counted upon to play nicely with every other one, ProBuilder and Nested Prefabs are both pretty major assets that provide excellent, near-essential editor features. I'm sure compatibility between these assets would benefit many users beyond my team. We would very much appreciate it if you guys would be willing to work together to resolve this issue.

Environment: Windows 8.1, Unity 2017.1.0p4, Nested Prefabs 1.2.6, ProBuilder Advanced 2.9.8f3

Share this post


Link to post
Share on other sites

Following the steps provided it seems to me like it's working as expected. The two properties you mentioned are however a bit special in how ProBuilder handles them. Materials need to be applied to ProBuilder objects via the "Material Editor" window, otherwise the material changes will be reverted whenever the prefab is updated. Similarly, ProBuilder manages some settings for you based on the Entity type and collider. If you want to manually manage your collider settings, just enable the "Custom Collider" setting on your Entity behavior.

With those two caveats in mind, I think ProBuilder should otherwise be compatible with Nested Prefabs. Let me know if those workarounds don't work for you!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×