2023-10-30から1日間の記事一覧

【Unity】Publicな変数を編集できないようにするCustom Attributeを作成する

はじめに Publicな変数を編集できないようにするReadOnlyなCustom Attributeを作成します スクリプト using UnityEngine; using UnityEditor; public class ReadOnlyAttribute : PropertyAttribute { } [CustomPropertyDrawer(typeof(ReadOnlyAttribute))] p…