【Unity エラー】CS0161 : コルーチンで"return"がない
コルーチンに設定して、"return"がない。
error CS0161: `SituationManager.DoorOpenWait()': not all code paths return a value
public void OpenDoor(){ isDoorOpen = true; print("Open Door"); SituationChara = TempSituation; StartCoroutine(DoorOpenWait()); } IEnumerator DoorOpenWait(){ GameObject Parent = this.transform.parent.gameObject; Parent.transform.FindChild("SituationImage").gameObject.GetComponent<SpriteRenderer>().sprite = SituationChara; }