1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Unityの無料アセットの「Runtime Monitoring」についてのまとめ

Posted at

今回はUnityでのデバックに便利そうだったので分かったことをまとめました。
まだ分からないことも多いので分かったらまた追加していく予定です。

1.アセットをMyAssetに追加

以下のリンクからアセットを追加

image.png

2.Unityにアセットをインポート

image.png

①Asset Storeを開く
②Open Pacage Managerを開く
③Runtime Monitoringを選択
④アセットをダウンロード
⑤アセットをインポート

3.monitoringの設定

image.png

①Toolを選択
②Runtime Monitoringを選択
③Settingを選択(monitoring画面が出てくる
④Visible On Loadにチェックを入れる

4.コードを書いてアタッチ

①右クリックからC#スクリプトを作成
image.png

Monitoring.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Baracuda.Monitoring;

public sealed class Monitor : MonoBehaviour
{
    // モニタリングしたい変数に [Monitor] 属性を付ける
    [Monitor] private int _test;

    private void Awake()
    {
        // このオブジェクトをモニタリング対象とする
        this.RegisterMonitor();
    }

    private void Update()
    {
        _test++;
    }

    private void OnDestroy()
    {
        // このオブジェクトをモニタリング対象から外す
        this.UnregisterMonitor();
    }
}

②Main Cameraにアタッチする

4.実行

再生ボタンを押すとこのようになる

image.png

参考記事

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?