Jump to content

Search the Community

Showing results for tags 'script'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Introduce Yourself
    • Showcase and WIP
  • ProBuilder
    • General Discussion
    • Bug Reports
    • Feature Requests
    • Extensions
    • Tutorial Requests
    • ProBuilder Contests
    • ProBuilderVR
  • Polybrush
    • Feature Requests
    • General Discussion
  • ProCore Utility Tools
    • ProGrids
    • ProGroups
    • QuickBrush
    • QuickEdit
    • QuickDecals
  • GILES (Generic In-Game Level Editing System)
    • Feature Requests
    • General Discussion

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 9 results

  1. Hi everyone. I'm doing a virtual art gallery for a painter friend of mine. I do all the design with ProBuilder which is great. Having a lot of paintings to exhibit, and none of them being the same dimensions, I'm trying to write a script to create dynamical framing. For each painting, I'm using a PB cube set to the painting's dimensions. Then I attach my framing script to it, so that the frame is created at runtime, using several extrusions. Unfortunately my script doesn't work very well. Is there any scripting documentation available ? Thanx in advance.
  2. Hello, it's my first question. I need to create shapes based on vertices as in the editor (capture attached) I try to find something to create meshes procedurally, currently have this code, but it produces an exception pb = new pb_Object(); List<Vector3> points = new List<Vector3>(); points.Add(new Vector3(0, 0, 0)); points.Add(new Vector3(1, 0, 0)); points.Add(new Vector3(0, 1, 0)); points.Add(new Vector3(1, 1, 0)); //same as in editor pb_ActionResult ar = pb.CreateShapeFromPolygon(points, 1, false); pb.ToMesh(); pb.Refresh(); Exception: NullReferenceException UnityEngine.Component.GetComponent[MeshFilter] () (at C:/buildslave/unity/build/artifacts/generated/common/runtime/ComponentBindings.gen.cs:48) pb_Object.get_msh () pb_Object.ToMesh (MeshTopology preferredTopology) pb_Object.ToMesh () how can I do it?, it would help me a lot
  3. How to use pro builder to simulate car mesh damage and repair. So given the basic car asset given with unity. So I have got as far as converting a car mesh into a pro builder mesh. I could create 5 states of damage 1 is no damage 5 is completely messed up. Then I have a car health and at various health levels i show one mesh and hide the others. so 100 percent health = show healthy mesh 1 80 to 99 show damaged mesh 2 + smoke particles + cracked glass 60-79 show damaged mesh 3 + smoke particles + cracked glass 40-59 show damaged mesh 4+ smoke particles + cracked glass 1- 39 show damaged mesh 5+ smoke particles + cracked glass 0= show absolute messed up car mesh + smoke particles + cracked glass What about using the collision to damage the mesh in real time using scripts?
  4. Hello, I would need to dynamically create Bezier shapes and update them live (through code). grosso modo : doing by code the : Tool > Brobuilder > Editor > new bezier shape action and then well editing the created objects through a script Sorry for potential redundant but couldn't find anywhere the code documentation or sample for the API for pro users to do such actions. sincerely
  5. To help those who are searching to do the same, below is a C# script to move the vertices of a pb object : using UnityEngine; using System.Collections; using ProBuilder2.Common; public class MoveVertex : MonoBehaviour { pb_Object pb; //ProBuilder Object pb_Face face; //Object face Vector3 VertCoo; //Vertex Coordinates int[] indices; //List of vertices in the choosen face void Start() { pb = GetComponent<pb_Object>(); //Get the component on the object pb_Face face = pb.faces[0]; //Get the choosen face indices = face.distinctIndices; //Only grab the unique indices - so (0,1,2,1,3,2) becomes (0,1,2,3) VertCoo = new Vector3(0.5f,0.5f,0); //New coordinates StartCoroutine(WaitAndChange()); } IEnumerator WaitAndChange() { yield return new WaitForSeconds(2); //After 2 seconds //We change the vertices' position pb.SetSharedVertexPosition(indices[0], VertCoo); pb.SetSharedVertexPosition(indices[1], VertCoo); pb.SetSharedVertexPosition(indices[2], VertCoo); pb.SetSharedVertexPosition(indices[3], VertCoo); } } To see what it does :
  6. Hello @karl again, I am with some questions about scripts, my goals is to subdivide faces by points and in scripts, because I was trying to built reliefs in a plane so, I need to click in a point in the plane create an tile (that calculations of points, hitpoint, etc is okay for me, just the ProBuilder geometry manipulation) and extrude it up, like the image:
  7. At the moment I'm currently trying to design something where the probuilder object's faces can be manipulated at runtime, problem is I need to grab the specific face the raycast is hitting, is this possible?
  8. Hi guys, I just recently purchased ProBuilder and ProGrids and am really impressed by these tools! I've designed levels in the Valve Hammer Editor for years and this finally gives me a similar work flow for Unity. I'm not a programmer and am really bad at writing my own Unity scripts. I need a little help altering a teleport script so it will work with ProBuilder objects. I've found that the teleport in the code snippet below behaves differently for standard ProBuilder objects versus standard Unity objects. The script takes the beam collision target and works out the height of that object by getting its scale and y position, then calculating the world y of the top of that object. The issue I am running into with ProBuilder objects is that the teleport is not taking the player the y position at the top of the object. It varies based on the height of the object. Here is the code snippet in question: private float GetTeleportY(Transform target, Vector3 tipPosition) { float newY = this.transform.position.y; // Check to see if the tip is on top of an object if (target && tipPosition.Y > (target.position.y + (target.localScale.y / 2))) { newY = (target.position.y + (target.localScale.y / 2)); } return newY; } Can someone explain why the ProBuilder Object is behaving differently than the Unity Object for this script? Thanks in advance!
  9. - Windows 10 x64 - Unity 5.2.2f1 Personal - ProBuilder 2.4.11f0 If we strip PB scripts in a GameObject and then make it as a Prefab, the Prefab doesn't contains a Mesh Filter anymore :
×