public static GameObject CreateNew(Vector3 position, Quaternion rotation) { GameObject go = new GameObject(); BConvexHull bConvexHull = go.AddComponent <BConvexHull>(); CreateNewBase(go, position, rotation); bConvexHull.BuildMesh(); go.name = "BConvexHull"; return(go); }
[MenuItem("GameObject/Create Other/BulletForUnity/BConvexHull")] //right click menu static void CreateBConvexHull() { Selection.activeObject = BConvexHull.CreateNew(GetCameraRaycastPosition(), Quaternion.identity); PostCreateObject(); }