カテゴリー - エラー基礎

FAQ

Unityを起動するとConsoleに赤いエラーが大量に出る
「Object reference not set...」と「NullReferenceException」の違いは?
「Build path ... must be a directory when building for Android」エラーが出た。
「Coroutine cannot yield while being iterated over by foreach」の意味は?
「Enter Play Mode」でエラーが出るが実行前は出ない。
「error CS0012: The type '○○' is defined in an assembly...」が出た。
「FormatException: Input string was not in a correct format.」が出た。
「GetComponent requires that the requested component...」が出た。
「IndexOutOfRangeException」エラーの意味と対処法は?
「InvalidCastException: Specified cast is not valid.」が出た。
「Maximum number of coroutines reached」エラーへの対処は?
「MissingComponentException」が発生した。何が原因か?
「NullReferenceException」が発生した。原因と対処法は?
「Object has been destroyed but you are still trying to access it.」への対処は?
「Obsolete」警告が出ている。対処すべきか?
「UnassignedReferenceException: The variable ○○ of ○○ has not been assigned.」が出た。
Unityエディタがフリーズして応答しない。どうすればよいか?
Unityのバージョンをアップグレードしたらエラーが増えた。
Unityを起動するとConsoleに赤いエラーが大量に出る。
スクリプトに文法エラーがないのにコンパイルが通らない。
再帰処理を使っていないのに「StackOverflowException」が出た。
「Assertion failed」とはどういう意味か?
「Cannot implicitly convert type 'float' to 'int'」エラーの対処法は?
「DivideByZeroException」エラーが出た。どう対処するか?
「FileNotFoundException」エラーが出た。何が原因か?
「InvalidOperationException」エラーが出た。意味は?
「StackOverflowException」が起きた。原因は何か?
「Type mismatch」系のエラーが出た場合の一般的な対処法は?
Consoleに「Warning」が大量に出ているが、無視してよいか?
エラーが出ているがどこで発生しているか分からない。デバッグ方法は?
エラーメッセージに行番号が表示されている。どう活用するか?
エラーログがConsoleで見つからない。ログのフィルタ方法は?
スクリプトを保存してもUnityに変更が反映されない。
「ArgumentOutOfRangeException: Index was out of range...」が出た。
「Coroutine couldn't be started because the game object is inactive」の意味は?
「Failed to load managed dll」というエラーの対処法は?
「KeyNotFoundException: The given key was not present...」が出た。
「Missing Script」コンポーネントを一括削除する方法は?
「NotImplementedException」が出た。
「ObjectDisposedException: Cannot access a disposed object.」が出た。
「OverflowException: Arithmetic operation resulted in an overflow.」が出た。
「Screen position out of view frustum」という警告が毎フレーム出る。
「Script is not derived from MonoBehaviour」エラーの原因は?
「The name 'Destroy' does not exist in the current context」エラーが出た。
「The referenced script on this Behaviour is missing!」の対処法は?
「There are inconsistent line endings in this script」警告の対処法は?
「Unity crashes on startup」の原因と対処方法は?
複数のスクリプトで同じクラス名を使うとどうなるか?
「Assets/... is not in a valid state for overwriting.」への対処は?
「Cannot destroy Transform component.」というエラーが出た。
「Hotkey conflicts」でショートカットが動かない場合の対処法は?
「IndexOutOfRangeException: Index was outside the bounds...」が出た。
「Multiple precompiled assemblies with the same name」が出た。
「NullReferenceException: Object reference not set...」が出た。
「Plugins must be compiled with '/unsafe'...」が出た。
「Shader compiler failed」というエラーへの対処法は?
「This script has been marked as broken and cannot be loaded」の意味は?
「TypeLoadException」が発生した場合の対処法は?
「UnityException: Transform child out of bounds」が出た。
Scene上のオブジェクトが消えた。Undoで戻す方法は?
Unityが突然クラッシュした。ログはどこで確認できるか?
エラーや警告をスクリプトから意図的に出力する方法は?
大量の警告ログで重要なエラーが埋もれてしまう問題の対処法は?
「ArgumentNullException: Value cannot be null. Parameter name: key」が出た。
「Assets/... is not allowed to be modified」という警告の意味は?
「MissingReferenceException: The object of type 'GameObject'...」が出た。
「Shader error in '○○': undeclared identifier '○○'」が出た。
「Trying to access a RenderTexture that has been released」の対処法は?
ビルド時に「IL2CPP error for method ... TypeLoadException」が出た。

9周年キャンペーン実施中 早い申込みほど受講料がお得に