目次
「DisableInPrefabAssets」属性
「DisableInPrefabAssets」属性を使用すると
Project ビューのプレハブの値を編集不可にすることができます
Project ビューのプレハブ
Hierarchy ビューのプレハブ
プレハブではないオブジェクト
ソースコード
using Sirenix.OdinInspector; using UnityEngine; public class Example : MonoBehaviour { [DisableInPrefabAssets] public int a; }
使い方
下記のように記述するだけで使用できます
[DisableInPrefabAssets] public int a;