3
2

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 5 years have passed since last update.

Sceneウィンドウに解説テキストを出し、今開いているシーンが何なのかを分かりやすくする

Last updated at Posted at 2018-07-06

はじめに

Unityの勉強会でUnityを動かして解説する時に

今開いているシーンがどういうものなのかが

「分かりにくい」

という問題があると思います。

image.png

Unity上に解説を出せば良いのでは?

Unityの画面に何も解説が表示されてないのが問題ではないか? 

→ なら、Unityに解説を表示させてみよう

→ 作ってみました。

作ったもの

Sceneビューに解説テキストが表示されます。
image.png

今開いているシーンがどんなものなのかが分かりやすくなった、ような気がします。

使い方

1. EditorSceneViewText.csを導入

まずは EditorSceneViewText.csをUnityプロジェクト内のEditorフォルダ以下に配置

image.png


# 2. テキストファイルの作成 シーンファイル(.unityファイル)と同じ場所にabout.txtを作成 ![image.png](https://qiita-image-store.s3.amazonaws.com/0/44288/686ecb68-b493-3da1-a647-5bb381435ded.png)
![image.png](https://qiita-image-store.s3.amazonaws.com/0/44288/3174fa97-8194-3772-27b6-a4b48d4ac0df.png)

3. シーンを開く

シーンを開くとabout.txtの中身がSceneビュー上に出てきます。
image.png

image.png

以上で終わりです。

おまけ: テキストをカラフルにしてみる

マークアップタグを使ってカラフルにするのも面白そうです.

image.png

about.txt
<color=yellow>これはTestシーンです。</color>
何もしません。
<b><color=#55c500>Qiita</color></b>の記事に使う用途で作成しました。

参考URL

Sceneビューにちょっと便利なGUIを表示させよう
https://qiita.com/r-ngtm/items/32bfa65b55635756bf3a

3
2
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
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?