// Token: 0x060041AE RID: 16814 RVA: 0x0014E264 File Offset: 0x0014C664 public static Arc Create(float width, float height1, float height2, float depth, int arcSegments, PivotPosition pivot) { GameObject gameObject = new GameObject("ArcPro"); gameObject.AddComponent <MeshFilter>(); MeshRenderer meshRenderer = gameObject.AddComponent <MeshRenderer>(); meshRenderer.sharedMaterial = new Material(Shader.Find("Diffuse")); Arc arc = gameObject.AddComponent <Arc>(); arc.gizmo = ArcGizmo.Create(); arc.gizmo.transform.parent = gameObject.transform; arc.GenerateGeometry(width, height1, height2, depth, arcSegments, pivot); return(arc); }
/// <summary> /// create Arc game object /// </summary> /// <param name="width">width of cube</param> /// <param name="height1">height1 of cube</param> /// <param name="height2">height2 of cube</param> /// <param name="depth">depth of cube</param> /// <param name="arcSegments">depth of the </param> /// <param name="pivot">position of the model pivot</param> /// <returns>Arc class with Arc game object</returns> public static Arc Create(float width, float height1, float height2, float depth, int arcSegments, PivotPosition pivot) { var planeObject = new GameObject("ArcPro"); planeObject.AddComponent <MeshFilter>(); var renderer = planeObject.AddComponent <MeshRenderer>(); renderer.sharedMaterial = new Material(Shader.Find("Diffuse")); var cube = planeObject.AddComponent <Arc>(); cube.gizmo = ArcGizmo.Create(); cube.gizmo.transform.parent = planeObject.transform; cube.GenerateGeometry(width, height1, height2, depth, arcSegments, pivot); return(cube); }