correctly sync to current script instance in script property editor
@@ -400,11 +400,15 @@ impl PropertyEditorDefinition for ScriptPropertyEditorDefinition {
.context()
.clone();
+ if let Some(value) = value.as_ref() {
if let Err(e) = inspector_ctx.sync(value, ctx.ui, layer_index + 1) {
Err(InspectorError::Group(e))
} else {
Ok(None)
}
+ } else {
+ Err(InspectorError::Custom("Invalid script value!".to_owned()))
+ }
}
}
