Name of pb_ gameobjects change at random and cause merge conflicts

I’m not sure if it does it every time but I’ve noticed when working with a scene that has a lot of probuilder objects, we often seem to get a lot of name changes. For example pb_Mesh113642 changing to pb_Mesh119286. Any way to stop this from happening?

1 Like

Hi,
Not a fix, but I’d probably export them out to Blender (or whatever you use) and then bring them back as “proper” imported meshes with the name I want them to have etc.

But I know some people actually build finished (?) levels with ProBuilder so that export-import might not be a viable option if you want to stay in Unity.

Not an option. Our artists do it most of the time, but we have test scenes where the point is not really the pretty environments, so we would like to not waste time with this or pollute the project with unnecessary assets.

1 Like

Hi! In the current system, PB needs to re-generate the mesh every time you make a change. By default, the data is stored in the “PB Mesh” component, which is then injected into the “Mesh Filter”, where you see that “pb_Mesh123456”. This shouldn’t actually matter though?

Or, are you using the experimental “Meshes are Assets” feature? Can you describe your issue with a bit more detail, plus version of Unity and ProBuilder? Thanks!

Hi @gabrielw_unity
We don’t use the “Meshes as Assets” feature and we sometimes get the “pb_Mesh123456” change to many (if not all) PB MeshFilters in the scene/prefab and then saved to disk with new ids. This very much matters for version control and conflict handling.

In our case, editing a single PB mesh does not trigger the full rebuild, but deactivating a root game object for a large subsection will.

In any case, is there a compelling reason to generate new mesh ids instead of reusing the previous when rebuilding?

Unity 2018.4.14 and ProBuilder 4.2.3

2 Likes

I’ve just come across this problem too. We have PB mesh doors and use the mesh on a mesh collider component. The component keeps losing the reference to the mesh.

1 Like

This makes it very difficult when comparing scenes… please address this.

1 Like

@gabrielw_unity This absolutely matters. Sometimes we run into accidental merge conflicts when one or both developers aren’t careful. It’s always a headache to tease out real changes from mesh id changes.

5811676--615073--upload_2020-5-6_9-17-50.png

There’s hundereds in here. I didn’t even adjust any geometry, it just does this. As the scene grows it gets worse and worse; to the point where I pretty much don’t want to use pro builder at all because of the headaches it causes. A shame too, because it makes quick iteration on grey boxing really handy.

Ah, sorry, I meant “doesn’t matter” in a different way - not regarding the source control aspect. Is a major issue with source control, yes.

Unfortunately, the base issue is that storing the mesh in the Scene (which PB does by default) will always result in nasty merging. We’re actively working on a solution to this, but it’s not simple or straightforward. Meanwhile, you can try using the experimental “Meshes are Assets”, which will store your mesh in the project. Sorry for the trouble!

1 Like

Thanks for the update and the potential work around! I know you’re all hard at work trying to get a million things done, but us end users don’t always see which way the ship is heading. It sounds like you’re absolutely doing the right thing and keep up the good work.

@gabrielw_unity Coming at this a bit late, but I did a search for this problem because it is truly obnoxious. Based on the discussion, I’m not entirely sure that you follow what folks here are saying? To that end, please answer the following question:

Why does ProBuilder update these meshes when no mesh changes occur?

What is it doing? Why do I see “pb_Mesh34438pb_Mesh285298” all over the place in my scene whenever I save the scene?

To be clear, since opening Unity I haven’t touched (selected in the Scene) a single GameObject containing a ProBuilder mesh. Why would ProBuilder suddenly need to go and regenerate all of itself even though I’ve touched nothing?

1 Like

@gabrielw_unity Update: I’ve just determined that ProBuilder will do this “regenerate/reassign (?) all meshes” when you trigger an “Undo” action while editing a scene.

Wut.

I am consistently able to get this to trigger by following these steps:

  • Open a scene with ProBuilder meshes.
  • Disable an empty GameObject in the scene.
  • Save the scene.
  • Verify that the diff only contains the disabled state in a diff application.
  • Undo the edit in Unity (Edit→Undo).
  • Save the scene.
  • Verify that the diff is suddenly full of pb_Mesh##### changes (and that is it).

What is going on here?

For the record I am on Unity 2019.4.17f1 with ProBuilder v4.4.0.

5 Likes

What is the status on this? I’ve also encountered the issue with Unity 2021.1.0f1 and ProBuilder 5.0.1.

2 Likes

Is there still “active” work on this?

2 Likes

Wondering this too. We keep having dozens of merge conflicts because of all these pb_x name changes :S

1 Like

@gabrielw_unity any update on this? It’s still happening and it makes ProBuilder nearly unusable in a professional environment :S

1 Like

+1

This has been fixed as of 5.1.0 - Remove mesh reference tracking by name by karl- · Pull Request #453 · Unity-Technologies/com.unity.probuilder · GitHub

2 Likes