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