Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won

  1. Hi, 1) Name of tool - ProBuilder 2) A brief description of the issue: I have been using ProBuilder to edit geometry at runtime and I have got it working how I would like it to, but when I build to mobile (Android) the mesh geometry remains static, it doesn't change at all. 3) My system environment: Windows 10, Unity 5.5.2, ProBuilder 2.7.0f7, LG g5 (Android 7.0) 5) List of steps, clearly explaining how to replicate the issue: I crated a 3x3 square with a hole in the middle I then selected the four inner faces and scale extruded them inward (x and z only) to create a smaller square. I then wrote the script below to take each of the inner faces of the small hole and move the vertices inward. (see GIF) shows an example of this. I then built the scene to mobile and when it loads none of the geometry is affected. public class retractedges : MonoBehaviour { public pb_Object surrounding; pb_Face[] selectedFaces; int count = 0; void Start () { pb_Face face1, face2, face3, face4; //four triangles from the inner squares of the object. int [] tri1 = new int[]{158, 159, 157}; int [] tri2 = new int[]{24, 25, 26}; int [] tri3 = new int[]{52, 53, 54}; int [] tri4 = new int[]{84, 85, 86}; //get a face for each triangle pb_Object_Utility.FaceWithTriangle(surrounding, tri1, out face1); pb_Object_Utility.FaceWithTriangle(surrounding, tri2, out face2); pb_Object_Utility.FaceWithTriangle(surrounding, tri3, out face3); pb_Object_Utility.FaceWithTriangle(surrounding, tri4, out face4); //add faces to array selectedFaces = new pb_Face[]{face1, face2, face3, face4}; } void Update () { count++; foreach(var face in selectedFaces) { //create a temporary array with one face to get all triangles pb_Face[] tempArray = new pb_Face[1]; tempArray[0] = face; var tris = pb_Face.AllTriangles(tempArray); //generate offset from face normal var offset = pb_Math.Normal(surrounding, face) * -0.000025f * count; //offset the faces vertices pb_Object_Utility.TranslateVertices(surrounding, tris, offset); } surrounding.ToMesh(); surrounding.Refresh(); } }
  2. IAmMoore08

    Runtime Level Editor Thread

    @bigd Thanks for the reply, I wont/don't have a transform gizmo because the player wont be interacting with one. I guess I should have stated my goal clearer. I want to basically create an animation of moving geometry in game. Is there a method for scaling a single face along an axis?
  3. IAmMoore08

    Runtime Level Editor Thread

    Hi, first time posting. I was wondering if anyone knows how to scale multiple faces around their centre point using the runtime api. I can get the desired effect in the unity editor (see image), but I need to achieve this at runtime. Any help would be greatly appreciated.