Search Unity

Probuilder 2.x Prefabs Disappear, Help!

Discussion in 'World Building' started by BostonGamesLLC, Mar 14, 2019.

  1. BostonGamesLLC

    BostonGamesLLC

    Joined:
    Jan 19, 2019
    Posts:
    15
    I am having trouble exporting prefab packages with meshes made using Probuilder. I include all dependencies with the prefabs I attempt to export, but when I import the packages to a new project all of the prefab components sculpted using Probuild do not appear and I cannot see, alter, or use them.

    ORIGINAL :oops::


    IMPORTED :eek::


    the Probuild meshes do not appear in the prefab icon or on the scene/game screens. there is the usual movable xyz axis icon when i click on the components, but it appears as an empty game object.

    There are no scripts attached to the objects.

    I am using Unity 2018.3.7 and ProBuilder 2.x

    I am still new to Unity and hoping this is a common problem that has an easy fix lol.
     
  2. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    963
    Hi! ProBuilder 2.x is very old now, I would recommend upgrading to 4.x. Make a backup first! (you are using GitHub/similar, I hope?)

    Second, ProBuilder currently stores mesh data in the scene, so if you need to send a ProBuilder prefab to another project, you should first use the "Export as Asset" tool. Click "Export", then choose "Asset" type. You could also use OBJ, but if it's just within Unity, Asset is a bit cleaner :)

    Hope that helps!
     
    BostonGamesLLC likes this.
  3. BostonGamesLLC

    BostonGamesLLC

    Joined:
    Jan 19, 2019
    Posts:
    15
    Working with the updated version 4.x now, and I have GitHub ^_~

    Have been testing different ways of exporting prefabs or meshes made with ProBuilder to use in more than one project, and the closest I can get is:

    A:
    1. Merging the mesh in ProBuilder (otherwise the child objects save separately in the Project window and is impractical for transferring between projects since you would have to manually re-position each piece to make the whole object again, not preferred but I couldn't find a workaround for this)
    2. Exporting the merged mesh using ProBuilder > Export as Asset
    3. Now I can load that mesh into another project, but all of the other detail data is gone such as materials/textures used and I get some bugs with detail work such as individual faces that had custom coloring disappearing.
    -or-

    B:
    1. Keeping all the child objects intact
    2. Exporting the meshes using ProBuilder > Export as Object
    3. I can now load the intact object with child objects in another project, which is better, but now only the meshes made using ProBuilder show. Other objects made using the Unity > Create menu do not show. No material/coloring data is transferred in this way either

    Is there a way I am missing to transfer a premade object or prefab in it's entirety (having all the objects and applied materials/textures used and everything) smoothly from project to project? I will have a lot of custom prefabs I'll be using from project to project.

    I looked around online and couldn't find a good fix.

    Thanks for your time!
     
  4. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    963
    Hi! Sorry for the basic Git question, I've learned to ask just in case :p

    So, I've given this a few test to be sure, and here's what you'll want to do:

    In the starting project:
    1. Create your prefab
    2. Create a new, empty scene
    3. Place the prefab into this scene, and save it
    4. Copy the prefab, the scene, and any required materials/textures/etc for the prefab, to your other project

    upload_2019-4-3_11-3-11.png

    In the other project:
    1. Double-click the Prefab in your project view
    1. Any ProBuilder faces that were using custom textures/materials will be pink, don't worry, we'll fix that!
    1. Select each ProBuilder object and check it's "Mesh Renderer" component - for any "Missing Material" items in the array, replace with the correct material (which you copied over)

    upload_2019-4-3_11-6-50.png

    That should do it! :) Let me know if you need any clarification, and yes I'm sorry it's a bit of a pain, working on better solutions! -GW