Arbor EditorでSerializeFieldを読み取り専用にする方法

Here is the forum to do the questions about how to use to Arbor developer.
Attention point:
  • We can not answer your questions about your project specific issues.
  • We can not answer your questions on Unity's specification issues.
  • Please check Arbor Documentation and ask a question if you still don't know how to use it. If the desired function is not described in the document, it is highly possible that the function does not exist from the beginning, so go to the request forum.

ここは、Arbor開発者へ使い方に関する質問を行うフォーラムです。
注意点:
  • ユーザー様のプロジェクトの仕様上の問題や設計に対する質問には答えられません。
  • Unityの仕様上の問題に対する質問には答えられません。
  • Arbor Documentationを確認の上、それでも使い方がわからない場合にご質問ください。欲しい機能の記載がドキュメントにない場合は機能が元から存在しない可能性が高いので要望フォーラムへ。

Forum rules
Here is the forum to do the questions about how to use to Arbor developer.
Attention point:
  • We can not answer your questions about your project specific issues.
  • We can not answer your questions on Unity's specification issues.
  • Please check Arbor Documentation and ask a question if you still don't know how to use it. If the desired function is not described in the document, it is highly possible that the function does not exist from the beginning, so go to the request forum.

ここは、Arbor開発者へ使い方に関する質問を行うフォーラムです。
注意点:
  • ユーザー様のプロジェクトの仕様上の問題や設計に対する質問には答えられません。
  • Unityの仕様上の問題に対する質問には答えられません。
  • Arbor Documentationを確認の上、それでも使い方がわからない場合にご質問ください。欲しい機能の記載がドキュメントにない場合は機能が元から存在しない可能性が高いので要望フォーラムへ。
Yuki

Arbor EditorでSerializeFieldを読み取り専用にする方法

Post by Yuki »

自作のArborスクリプト内で、
[SerializeField]属性を付けたフィールドや、publicにしたフィールドは
Arbor Editor上に表示されて編集可能になるのですが、これを読み取り専用にして、編集できないようにする方法が知りたいです。

こちらの属性一覧にはそれらしい属性が見つかりませんでした。
https://arbor-docs.caitsithware.com/ja/ ... butes.html
User avatar
caitsithware
管理人
Posts: 493
Joined: 2015/08/17 12:41

Re: Arbor EditorでSerializeFieldを読み取り専用にする方法

Post by caitsithware »

読み取り専用というのは「Inspectorにフィールドは表示されるが値を表示するだけで編集されないよう無効状態にする」ということでしたら
ArborというよりもUnityの標準機能としてもお望みの機能は提供されておりません。
Editor拡張スクリプトでPropertyDrawerを自作する必要があります。
参考リンク : 【Unity】編集不可のパラメータをInspectorに表示する
※参考リンク先の内容や、Editor拡張スクリプトの書き方についてはArborの範疇ではないためサポート対象外となります。
Yuki

Re: Arbor EditorでSerializeFieldを読み取り専用にする方法

Post by Yuki »

了解しました。
リンク先のやり方で、フィールドを編集できない無効状態にすることができました。
ありがとうございました。
Post Reply