예제 #1
0
        public static GameObject CreateNew(Vector3 position, Quaternion rotation)
        {
            GameObject go        = new GameObject();
            BCapsule   bCylinder = go.AddComponent <BCapsule>();

            CreateNewBase(go, position, rotation);
            bCylinder.BuildMesh();
            go.name = "BCapsule";
            return(go);
        }
 [MenuItem("GameObject/Create Other/BulletForUnity/BCapsule")]  //right click menu
 static void CreateBCapsule()
 {
     Selection.activeObject = BCapsule.CreateNew(GetCameraRaycastPosition(), Quaternion.identity);
     PostCreateObject();
 }