【3Dゲームエンジン】Unity質問スレッド14 [転載禁止]©5ch.net
■ このスレッドは過去ログ倉庫に格納されています
0075名前は開発中のものです。
2014/12/12(金) 22:09:13.57ID:LAQX7U6J入門の本を読みながらやっていますが、
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.GUI.Label (Rect position, UnityEngine.GUIContent content, UnityEngine.GUIStyle style)
UnityEngine.GUI.Label (Rect position, System.String text, UnityEngine.GUIStyle style)
DeathCounter.OnGUI () (at Assets/script/DeathCounter.js:21)
というのが大量に出てきました。ver4.6です。
コードは下のところになにかあるらしいのですが、よくわかりません。
どうしたら消せますか><
function OnGUI () {
if( deathCount >= 20 )
{
GUI.Label( Rect ( Screen.width / 2 -100, 250, 200, 80) , "GAME OVER" , style );←ここ
if( GUI.Button(Rect ( Screen.width / 2 -100, 200, 200, 30), "Go title" ))
{
Application.LoadLevel("title");
}
}
}
■ このスレッドは過去ログ倉庫に格納されています