fix debug

This commit is contained in:
kimura 2022-06-21 14:55:39 +09:00
parent 996af05dd6
commit a51093553f
1 changed files with 5 additions and 2 deletions

View File

@ -122,7 +122,6 @@ namespace MyGame.Scenes.MiniGame.Scripts
{ {
return; return;
} }
x.enabled = false;
#if UNITY_EDITOR #if UNITY_EDITOR
var sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere); var sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
sphere.GetComponent<MeshRenderer>().material.color = Color.red; sphere.GetComponent<MeshRenderer>().material.color = Color.red;
@ -131,9 +130,13 @@ namespace MyGame.Scenes.MiniGame.Scripts
sphere.transform.SetPositionZ(-5f); sphere.transform.SetPositionZ(-5f);
if (item.ItemType == StageItem.Type.Obstacle && isDebug) if (item.ItemType == StageItem.Type.Obstacle && isDebug)
{ {
EditorApplication.isPaused = true; Observable.NextFrame().Subscribe(_ =>
{
EditorApplication.isPaused = true;
}).AddTo(this);
} }
#endif #endif
x.enabled = false;
switch (item.ItemType) switch (item.ItemType)
{ {
case StageItem.Type.Item1: case StageItem.Type.Item1: