private void RenderAnimatableProperty(SerializedProperty animatableProperty, int animationTargetIndex) { SerializedProperty animatablePropertyName = animatableProperty.FindPropertyRelative("animatablePropertyName"); SerializedProperty stateName = animatableProperty.FindPropertyRelative("stateName"); SerializedProperty targetObj = animatableProperty.FindPropertyRelative("target"); GameObject targetGameObject = targetObj.objectReferenceValue as GameObject; if (targetGameObject != null) { using (var check = new EditorGUI.ChangeCheckScope()) { EditorGUILayout.PropertyField(animatableProperty, true); if (check.changed) { instance.SetKeyFrames(stateName.stringValue, animationTargetIndex); } } } }