概要 using System.Collections.Generic; using UnityEngine; public class Example : MonoBehaviour { [Reorderable] public string[] m_names; [Reorderable] public Vector3[] m_positions; [Reorderable] public List<Color> m_colors; } 参考サイト様
![【Unity】Unity 2020.2a 新機能 - 配列やリストを Inspector で並べ替えられるようにする「Reorderable」属性 - コガネブログ](https://cdn-ak-scissors.b.st-hatena.com/image/square/d60ffd55a99cb2731ac092546ec95bce01b8a342/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fb%2Fbaba_s%2F20200626%2F20200626095235.gif)
Inspectorに表示したいけど編集されたくない。 というこどでReadOnlyなSerializeFiledをつくります。 実現方法は自前のAttributeを用意します。 ReadOnlyAttribute ReadOnlyDrawer.csはEditorフォルダに置いてください。 どうやら配列のSizeはReadOnlyにならないようです。 どうにかならないかな… あと、[SerializeField, ReadOnly]でもいいみたいです。 Attributeは省略できるようですね。 個人でゲーム開発をはじめます。 まずは基礎構築から… その過程の記事がメインになっていくと思います。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く