Unity produces log files for the Editor, package manager, and development players. You can use these log files to understand where any problems happened in your application.
Unity は Console ウィンドウ からの全てのメッセージ、警告、およびエラーをログファイルに追加します。Console ウィンドウやログに独自のメッセージを追加するには、Debug クラス を使用します。
ログファイルの保存場所はオペレーティングシステムによって異なります。デフォルトの場所は本ページに記載されていますが、特定のコマンドライン引数を使用して、Unity がログファイルを生成するタイミングと場所を制御することも可能です。詳細は コマンドライン引数 のドキュメントを参照してください。
Console ウィンドウからエディターログにアクセスすることができます。これを行うには、Console ウィンドウ (メニュー: Window > General > Console) を開き、Console ウィンドウメニューから Open Editor Log を選択します。
ログタイプ | ログの場所 |
---|---|
エディター | ~/.config/unity3d/Editor.log |
Package Manager | ~/.config/unity3d/upm.log |
macOS では、Console.app ユーティリティを使用して Unity のログにアクセスすることもできます。
ログタイプ | ログの場所 |
---|---|
エディター | ~/Library/Logs/Unity/Editor.log |
Package Manager | ~/Library/Logs/Unity/upm.log |
Windows では、Package Manager とエディターのログは、Windows Explorer にデフォルトで表示されないフォルダーに配置されます。AppData フォルダーを表示するには、Windows の隠しファイルの設定を有効にする必要があります。この方法に関する詳細は、Microsoft のドキュメント Windows の隠しファイルと隠しフォルダを表示する を参照してください。
Windows では、デフォルトでは標準の出力ストリームは存在しません。そのため、CI システムからの子プロセスとして、有効に設定された stdout
ストリームを使ってエディターを起動する必要があります。-
を指定して stdout
に出力を送信する場合、Console ウィンドウには出力が表示されません。
ログタイプ | ログの場所 |
---|---|
エディター | %LOCALAPPDATA%\Unity\Editor\Editor.log |
Package Manager | ユーザーアカウント: %LOCALAPPDATA%UnityEditor Filterupm.log システムアカウント: %ALLUSERSPROFILE%GenuinUnityEditor Filterupm.log
|
クラッシュファイル |
%TMP%\CompanyName\ProductName\Crashes ノート: -crash-report-folder コマンドライン引数でフォルダーの場所を上書きできます。 |
プレイヤーログを表示するには、Console ウィンドウ (メニュー: Window > General > Console) を開き、Console ウィンドウのメニューから Open Player Log を選択します。以下のフォルダーも参照できます。
オペレーティングシステム | プレイヤーログの場所 |
---|---|
Android | Use Android debug bridge (adb) to access your device log. To use it, launch the adb application in the Android SDK/platform-tools directory with the logcat parameter:$ adb logcat For more information, see Android’s documentation on logcat. You can also use Unity’s Logcat package which adds an interface to the Editor to get logs from Android. |
iOS | iOS デバイスログにアクセスするには、GDB コンソールを使用するか、XCode を通してオーガナイザーコンソールを使用します。デバイスログに関する詳細は、Apple のドキュメント を参照してください。 |
Linux | ~/.config/unity3d/CompanyName/ProductName/Player.log |
macOS |
~/Library/Logs/Company Name/Product Name/Player.log ノート: Console.app ユーティリティを使用してログファイルを見つけることもできます。 |
ユニバーサル Windows プラットフォーム | %USERPROFILE%\AppData\Local\Packages<productname>\TempState\UnityPlayer.log |
WebGL | Unity はログ出力を ブラウザーの JavaScript コンソール に書き込みます。 |
Windows | %USERPROFILE%\AppData\LocalLow\CompanyName\ProductName\Player.log |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.