Jump to content


  • Content count

  • Joined

  • Last visited

  1. You are right; the vertex colors seem to work perfectly fine! I just recorded a small video of a use scenario where we have some floor tiles. Previously, we needed to define the "crack" object to have a different material in order to show a grid between each tile. This would make batching difficult. Now, using the vertex colors, we can have the same material for all tiles+cracks, but just change the color. It seems like the batching count is constant. I've never worked with vertex colors before. Is there anything I should be aware of? Also, is it possible to add more colors to the Vertex Colors panel? VertexColors.mp4
  2. Thanks, it seems to work using OnMeshCompleted: private static Vector2 Color = new Vector2(1,0); private static Vector2[] tempUVs; static void OnMeshCompiled(pb_Object pb, Mesh mesh) { tempUVs = mesh.uv; for (int i = 0; i < tempUVs.Length; i++) tempUVs[i] = Color; mesh.uv = tempUVs; mesh.colors32 = null; mesh.tangents = null; } However, I would like my designers to be able to define the UVs themselves, preferably via the editor. Would it be possible to make a button where they can set the UVs as shown in the example image below? Can I somehow get the current pb object and update its UVs via a custom editor window? Or, alternatively, can I add a Vector2 field in the Shape Tool, so we can set the UVs when creating the object?
  3. We are making a game in Unity that only uses flat colors (no textures). Instead of having many different materials that have different colors, we are considering making a texture atlas that will be used as a color chart. Each model will then pick the right color in this atlas using its UV coordinates. This is to limit the amount of batches we need to make. E.g., UV coordinate (0,0) is red; UV coordinate (1,1) is green. Is it possible to manually override all UV coordinates for models made in ProBuilder? I have tried the UV Editor, but what I want is to just specify the values manually. I can do it via a script, but this creates a new Mesh instance and requires some run-time code. Vector2 Color = new Vector2(1,1); // green mesh = GetComponent<MeshFilter>().mesh; Vector2[] uvs = mesh.uv; for (int i = 0; i < uvs.Length; i++) { uvs[i] = Color; mesh.uv = uvs; }
  4. Great, thanks! Will be sure to report back if we discover any new issues
  5. Thanks. I have to admit that I haven't really read the documentation (because I don't really use the plugin, since that's our level designer's job [i am a programmer]), but I just made some assumptions about how ProBuilder works when it comes to prefabs and meshes.
  6. We just tried the "Export Asset" option, but not sure it works as we thought. I have recorded a short clip where I: - Make a ProBuilder object - Export it as an asset (prefab?) - Pull that prefab into the scene - ProBuilderize the prefab - Duplicate the asset - Change one thing in prefab A, apply, then revert to prefab B As you can see, the meshes are unique for prefab A and B. Link to video 1 Also, how does it work with compound objects? As in, we have multiple ProBuilder child objects on one parent (with or without the ProBuilder script)? See the video below. Link to video 2
  7. Cool, looking forward to that! Oh, and it would be nice if the asset cache is explained a bit further in the options menu, e.g., should we synchronize the files from "ProBuilder/ProBuilderMeshCache/", or should each person generate the files themselves in their Unity?
  8. Oh, I think that is what we need. Maybe call the option something like "Make prefab asset" instead?
  9. Thanks for you answer. On the surface, it seems to work. However, having ticked that option, the editor freezes for about 20-30 seconds every time we hit Play or Stop. It seems like ProBuilder is generating the mesh cache for every object every time. We tried to delete the cache folder, just to test it out, and the files were generated again. Are we doing it correctly? Also, how about having the "Mesh are assets" as an object-per-object basis, instead of a global setting? We are basically trying to build a prison like the picture below. The cell (walls, floor, bars, door, window) is made via ProBuilder, and we basically want to duplicate it a lot of times. Having struggled for quite some time, we decided to just take on of the cells and export it as an .obj file and then reuse that as a prefab instead. Seems to work much smoother (our scene file went from 150+ MB to 2 MB, and now whenever we hit Play it only takes a few seconds to start).
  10. Hi, One of our level designers just submitted a scene to our Git repository, but we found that the scene file was very large (> 100 MB). The scene is actually quite simple, since it consists of the same building copied about 100 times. The building object was created with ProBuilder, then made into a prefab by dragging it to a prefabs folder, then copied a bunch of times. After trying doing this myself, I saw that the mesh generated is actually not reused, hence why there is so much unique mesh data, even if it is supposed to be the exact same. Is this supposed to happen? How should we do it instead? My understanding of (traditional Unity) prefabs is that the mesh data is just stored one time in memory and then reused for each instantiated clone in the scene. How does this work with ProBuilder? I also recorded a GIF to show the situation: