Beispiel #1
0
        [MenuItem("GameObject/Create Other/BulletForUnity/BSoftBody/BSoftBodyWMesh")]  //right click menu
        static void CreateBSoftWithMesh()
        {
            BAnyMeshSettings settings = new BAnyMeshSettings();

            settings.meshType      = PrimitiveMeshOptions.Bunny;
            Selection.activeObject = BSoftBodyWMesh.CreateNew(EditorHelpers.GetCameraRaycastPosition(), Quaternion.identity, settings.Build(), true, SBSettingsPresets.ShapeMatching);
            PostCreateObject();
        }
 [MenuItem("GameObject/Create Other/BulletForUnity/BSoftBody/Rope")]  //right click menu
 static void CreateBCube()
 {
     Selection.activeObject = BSoftBodyRope.CreateNew(EditorHelpers.GetCameraRaycastPosition(), Quaternion.identity);
     PostCreateObject();
 }
 [MenuItem("GameObject/Create Other/BulletForUnity/BSoftBody/BSoftBodyWMesh")]  //right click menu
 static void CreateBSoftWithMesh()
 {
     Selection.activeObject = BSoftBodyWMesh.CreateNew(EditorHelpers.GetCameraRaycastPosition(), Quaternion.identity, BAnyMeshSettingsForEditor.Instance.Build(), true);
     PostCreateObject();
 }