Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Name of pb_ gameobjects change at random and cause merge conflicts

Discussion in 'World Building' started by oxysofts, Dec 2, 2019.

  1. oxysofts

    oxysofts

    Joined:
    Dec 17, 2015
    Posts:
    111
    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?
     
    sand_lantern likes this.
  2. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,368
    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.
     
  3. oxysofts

    oxysofts

    Joined:
    Dec 17, 2015
    Posts:
    111
    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.
     
    sand_lantern likes this.
  4. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    782
    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!
     
  5. martin_unity412

    martin_unity412

    Joined:
    Jan 8, 2020
    Posts:
    5
    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
     
    Last edited: Feb 26, 2020
    sand_lantern and dariony like this.
  6. MajorParts

    MajorParts

    Joined:
    Sep 27, 2014
    Posts:
    86
    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.
     
    sand_lantern likes this.
  7. dariony

    dariony

    Joined:
    May 16, 2015
    Posts:
    17
    This makes it very difficult when comparing scenes... please address this.
     
    sand_lantern likes this.
  8. sand_lantern

    sand_lantern

    Joined:
    Sep 15, 2017
    Posts:
    175
    @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.

    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.
     
  9. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    782
    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!
     
    sand_lantern likes this.
  10. sand_lantern

    sand_lantern

    Joined:
    Sep 15, 2017
    Posts:
    175
    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.
     
  11. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    892
    @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?
     
    sand_lantern likes this.
  12. SonicBloomEric

    SonicBloomEric

    Joined:
    Sep 11, 2014
    Posts:
    892
    @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:
    1. Open a scene with ProBuilder meshes.
    2. Disable an empty GameObject in the scene.
    3. Save the scene.
    4. Verify that the diff only contains the disabled state in a diff application.
    5. Undo the edit in Unity (Edit→Undo).
    6. Save the scene.
    7. 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.
     
    tomblind and sand_lantern like this.
  13. Edvinas01

    Edvinas01

    Joined:
    Sep 15, 2015
    Posts:
    2
    What is the status on this? I've also encountered the issue with Unity 20.21.1.0f1 and ProBuilder 5.0.1.
     
    sand_lantern likes this.
unityunity