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์—์„œ ์ฐพ์„์ˆ˜๊ฐ€ ์—†๋Š”๋ฐ ์ฐพ์„ ์ˆ˜ ์žˆ๊ฒŒํ•˜๋Š” ๋ฐฉ๋ฒ• ๋ญ ์—†์„๊นŒ