実現したいこと
Debug.Logの内容をステータス欄にも逐一表示させたい。
前提
現在Unityを使っています。Unity上でDebug.Logを使用するとConsole欄には常に表示されるメッセージがなぜだかステータス欄には最初の一度しか表示されません。
以前はステータス欄にも2回目以降表示されていたと思うのですがいつの間にか変化しなくなっていました。何卒ご教授ください。
「Debug Log 2回目以降 表示されない」などで検索しても同様のケースが見つからず困っております。
画像のコンソール欄は問題なく動いておりますが、下のステータス欄は最初に1回ずつは表示されますがその後は変更されない状況です。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class StateController : MonoBehaviour
{
public enum StateType
{
None = 0,
Title,
Menu,
}
public StateType CurrentState; public StateBase State; public ConfigState StateA ; public TitleState StateB; // Start is called before the first frame update void Start() { CurrentState = StateType.None; StateA = gameObject.AddComponent<ConfigState>(); StateB = gameObject.AddComponent<TitleState>(); State = StateA; } // Update is called once per frame void Update() { ; //���N���b�N���t���� if (Input.GetMouseButtonDown(0)) State.talk(); //Debug.Log("Pressed primary button."); //�E�N���b�N���t���� if (Input.GetMouseButtonDown(1)) StateB.talk(); //Debug.Log("Pressed secondary button."); //�~�h���N���b�N���t���� if (Input.GetMouseButtonDown(2)) Debug.Log("Pressed middle click."); }
}
回答3件
あなたの回答
tips
プレビュー