Prefab Mesh=> Rotation
Set
public static void Set_Rotation( Vector3 rot)
Example:
//Create a spline plus game object at Vector3.zero var sPData = SplinePlusAPI.CreateSplinePlus(new Vector3(0,0,0)); //Add a deformed mesh component to the spline plus game object var deformedMesh = sPData.Add_DeformMesh(); //Create a new prefab Mesh for the branch with key 3 var prefabMesh= deformedMesh.Create_PrefabMesh(3,prefabMeshGO); // Set prefabMesh rotation prefabMesh.Set_Rotation(new Vector3(90,0,180)); //Update procedural mesh generated on all the branches deformedMesh.Update_Branches(true, true);
Get
public static Vector3 Get_Rotation()
Example:
//Create a spline plus game object at Vector3.zero var sPData = SplinePlusAPI.CreateSplinePlus(new Vector3(0,0,0)); //Add a deformed mesh component to the spline plus game object var deformedMesh = sPData.Add_DeformMesh(); //Create a new prefab Mesh for the branch with key 3 var prefabMesh= deformedMesh.Create_PrefabMesh(3,prefabMeshGO); // Get the prefabMesh rotation var rot =prefabMesh.Get_Rotation(); Debug.Log(rot); //Update procedural mesh generated on all the branches deformedMesh.Update_Branches(true, true);