Unity-Technologies/UnityCsReference · error · ArgumentException
Recursive SetLivePropertyOverrides are not allowed.
Error message
Recursive SetLivePropertyOverrides are not allowed.
What it means
Thrown by Internal_CallPropertyOverrideCallback when the cached serialized object's native pointer is already set to a different pointer, indicating SetLivePropertyOverrides was re-entered for a different object. The override callback path is not re-entrant across different targets.
Source
Thrown at Editor/Mono/InspectorUtility.cs:141
{
livePropertyFeatureEnabled = true;
}
}
finally
{
// This serialized object is just a temp reference to pass around, it doesn't own the pointer
s_CachedSerializedObject.m_NativeObjectPtr = IntPtr.Zero;
}
return livePropertyFeatureEnabled;
}
// Invoke override callback for live property.
[RequiredByNativeCode]
internal static void Internal_CallPropertyOverrideCallback(IntPtr nativeObjectPtr, bool isLiveUpdate)
{
if (s_CachedSerializedObject.m_NativeObjectPtr != IntPtr.Zero && s_CachedSerializedObject.m_NativeObjectPtr != nativeObjectPtr)
throw new ArgumentException("Recursive SetLivePropertyOverrides are not allowed.");
try
{
if (s_CachedSerializedObject.m_NativeObjectPtr == IntPtr.Zero)
{
s_CachedSerializedObject.m_NativeObjectPtr = nativeObjectPtr;
if (s_CachedSerializedObject.targetObject == null)
return;
}
var targetType = s_CachedSerializedObject.targetObject.GetType();
if (s_LivePropertyOverrideCallbacks.TryGetValue(targetType, out var cb))
{
cb.Invoke(s_CachedSerializedObject, isLiveUpdate);
}
}
finally
{View on GitHub (pinned to 225b0fbdb5)
Solutions
- Do not invoke property overrides on other objects from inside an override callback.
- Keep override callbacks self-contained to the current target object.
- Queue cross-object work via EditorApplication.delayCall to run after the callback unwinds.
Example fix
// before // inside override callback for target A: ApplyToTarget(B); // triggers override for B -> throws // after EditorApplication.delayCall += () => ApplyToTarget(B);
Defensive patterns
Strategy: try-catch
Validate before calling
// Not directly callable; guard by keeping override callbacks scoped to the current target.
Try / catch
try { /* cross-target work in callback */ }
catch (ArgumentException ex) when (ex.Message.Contains("Recursive"))
{ EditorApplication.delayCall += () => ApplyToTarget(B); } Prevention
- Keep override callbacks self-contained.
- Queue cross-object work via delayCall.
When it happens
Trigger: A live-property override callback for object A triggers property override invocation for object B while s_CachedSerializedObject still references A's native pointer. Re-entrant property overrides during a live update.
Common situations: Custom inspector logic that touches another object's properties from within a live-property override. Native callbacks firing for a second object while the first override is still executing.
Related errors
- Recursive EnableLivePropertyFeature are not allowed.
- The SerializedProperty '{0}' is not supported by BeginProper
- The MaterialProperty '{0}' should be of type 'Texture' (its
- List of materials contains null
- Unknown vertex format {format}
AI-assisted analysis of Unity-Technologies/UnityCsReference@225b0fbdb5 (2026-08-13).
Data as JSON: /api/errors/74656e14a1a1d2c9.
Report an issue: GitHub.