Prefab picavoxel volume not displaying

harris1989 posted this 24 November 2017

Hi there,

I've got 2 picavoxel volumes, one with an X and one with an O for a tic-tac-toe game. Rather than having 3x3 tiles and therefore 9 volumes added to my scene, the game gives the player the opportunity to set the grid size to n x m. For this reason, my X and O volumes are saved as prefabs so that my game controller can instantiate them at runtime when needed. When testing this with 1 instance of each X and O, only one of the volumes actually looks to be rendered by default.

If I click "Rebuild volume" on the unrendered volume when playing in Unity the volume is created, as I would have expected in the first place.

Why are the prefabs not being built from prefabs?

Order By: Standard | Newest | Votes
GarethIW posted this 24 November 2017

I can't be 100% certain, but it sounds like you may have duplicated the volume before creating your prefabs. If that's the case, they probably share a mesh asset at the moment. Try the following to fix it:

  1. In the editor, instantiate both your X and O volumes (drag and drop them to a scene)
  2. For both of the objects' Volume inspectors, click the New Mesh Asset Instance button (very bottom of the inspector)
  3. Apply the changes to both of the prefabs
  4. Remove them from the scene

Hopefully when you runtime instantiate them they will now work correctly.

For a detailed explanation of what is happening there, see my posts in the following thread:

Our 127 members have posted 466 times in 112 discussions