FyroxEngine/Fyrox · error

Property is not inheritable!

Error message

Property {path} is not inheritable!

What it means

Logged in fyrox-graph's revert_inheritable_property when the child's property at the given path resolves successfully but is not an InheritableVariable. Only inheritable variables support the modified/revert mechanism, so the revert cannot proceed. Usually means targeting a plain (non-inherited) field.

Solutions

  1. Only call revert_inheritable_property on fields wrapped in InheritableVariable
  2. Check the field definition in fyrox source to confirm it is inheritable before reverting
  3. Fall back to directly setting the desired value on non-inheritable fields
  4. Skip plain fields silently instead of logging an error when batch-reverting

Example fix

// before
Log::err(format!("Property {path} is not inheritable!"));
// after
// Use direct assignment for non-inheritable fields:
node.as_reflect_mut().set_field_by_path(path, parent_value)?;
Defensive patterns

Strategy: type-guard

Validate before calling

// only revert fields declared as InheritableVariable<T> in the node definition

Type guard

fn is_inheritable(field: &dyn Reflect) -> bool { field.as_inheritable_variable().is_some() }

Try / catch

if child_field.as_inheritable_variable_mut().is_some() {
    // revert
} else {
    Log::debug(format!("{path} is not inheritable; skipping"));
}

Prevention

When it happens

Trigger: resolve_path_mut finds the field, but as_inheritable_variable_mut returns None — the field is a plain field (e.g. a raw f32/String) rather than an InheritableVariable-wrapped property.

Common situations: Attempting to revert properties that were never inheritable (e.g. name, id), engine version changes converting fields to/from inheritable, editor plugins reverting arbitrary paths.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of FyroxEngine/Fyrox@76c91aad8e (2026-09-10). Data as JSON: /api/errors/f982f168b7aa2ea8. Report an issue: GitHub.

Appendix: source

Thrown at fyrox-graph/src/lib.rs:573

                        if let Some(parent_inheritable) = parent_field.as_inheritable_variable() {
                            parent_value = parent_inheritable.inner_value_ref().try_clone_box();
                        }
                    }
                    Err(e) => Log::err(format!(
                        "Failed to resolve parent path {path}. Reason: {e:?}"
                    )),
                });

            // Check whether the child's field is inheritable and modified.
            let mut need_revert = false;

            self.inner_mut()
                .resolve_path_mut(path, &mut |result| match result {
                    Ok(child_field) => {
                        if let Some(child_inheritable) = child_field.as_inheritable_variable_mut() {
                            need_revert = child_inheritable.is_modified();
                        } else {
                            Log::err(format!("Property {path} is not inheritable!"))
                        }
                    }
                    Err(e) => Log::err(format!(
                        "Failed to resolve child path {path}. Reason: {e:?}"
                    )),
                });

            // Try to apply it to the child.
            if need_revert {
                if let Some(parent_value) = parent_value {
                    let mut was_set = false;

                    let mut parent_value = Some(parent_value);

                    self.inner_mut().set_field_by_path(
                        path,
                        parent_value.take().unwrap(),
                        &mut |result| match result {

View on GitHub (pinned to 76c91aad8e)