Search Unity

Probuilder - how do I make a prefab out of the mesh?

Discussion in 'World Building' started by sebas77, Oct 3, 2018.

  1. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,642
    Hello,

    if I currently create a prefab out of the generate mesh, it will generate a new mesh every time the prefab is instantiated, this will break GPU instancing (also, why?)

    Is there a workaround for it? If I clean up the prefab script, then the mesh is surprisingly not baked, but instead it will be removed

    please help :(
     
  2. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
    Use the `Export Asset` option to save the mesh to your project.

    This is something we're looking to improve, but for the moment we have to make due with this workaround.
     
    BiomotionLab and sebas77 like this.
  3. moco2k

    moco2k

    Joined:
    Apr 29, 2015
    Posts:
    294
    I think it would be a quite powerful feature if ProBuilder can detect prefab-meshes and automatically re-uses them across prefab instances so GPU instancing works and a manual export isn't needed. Maybe, this feature can be implemented in future so that it is compatible with the upcoming nested prefabs features.
     
    kaarrrllll likes this.
  4. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    i remember in old versions of Probuilder (before unity obtain it) when probuilder scripts gets update it and the need to update scene scripts comes along.. many things can go wrong, and meshes gets lost in scene.. what i would want to have is an option.. a fail safe functionality to have the mesh backed up somewhere, so even if i decided to remove probuilder or reinstall it.. i would still maintain the mesh..