var tProp = OverrideCtrl.GetType().GetField("name", BindingFlags.NonPublic | BindingFlags.Instance);
tProp.SetValue(tPorp, "new name value");
但若設定的是繼承MonoBehaviour的物件的話,請在setValue(Object, Value)中,把Object直接指向物件。
public GameObject TargetObject = null;
private void ReplaceObj(){
var tProp = OverrideCtrl.GetType().GetField("monoObject", BindingFlags.NonPublic | BindingFlags.Instance);
tProp.SetValue(OverrideCtrl, TargetObject);
}