public class c : Monobehaviour{
A testA = new B();
}
public class A{
int a;
}
public class B : A{
int b;
}
[CustomPropertyDrawer(typeof(A), true)]
public class ADrawer : PropertyDrawer {
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) {
ย ย ย ย int PropertyNum = property.FindPropertyRelative("a").intValue;ย ย ์ด๊ฑด ๋จ
ย ย ย ย int PropertyNum = property.FindPropertyRelative("b").intValue;ย ย ์ด๊ฑด ์ ๋จ
}
์ ์ํฉ์ฒ๋ผ A๋ฅผ ์์๋ฐ๋ B ํด๋์ค์์ ์๋ ํ๋๋ย
APropertyDrawer์์ ์ฐพ์์๊ฐ ์๋๋ฐ ์ฐพ์ ์ ์๊ฒํ๋ ๋ฐฉ๋ฒ ๋ญ ์์๊น
๋๊ธ 0