UnityでAndroidプラットフォームのDebugging方法

今回はUnityでAndroid用のゲームを開発するとき、Consoleのログを表示する方法を紹介します。Android上のソフトを開発するときよく使うlogcatを利用します。以下の方法はWindows 7を基準としています。

手順は簡単です。

  1. コマンドプロンプトを開く。(cmd.exe)
  2. logcatの実行 (adb logcat)
  3. Unity上でゲームをビルドし、デバイスに転送して実行。

これでコマンドプロンプト上にデバイス上で実行されているすべてのアプリに関するログが表示され、ゲーム上でDebug.Logを利用して表示するデバッグ用にログも表示されます。

またログをクリアするときは

adb logcat -c

ログをファイルに保存するときは (yourlog.txtは任意のファイル名でいいです)

adb logcat > yourlog.txt

を利用します。

出典:http://answers.unity3d.com/questions/175161/debugging-android.html

作成者: kkc0923

KANOTYPE管理者。

コメントする

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください