HasManagedReferencesWithMissingTypes(Object)
Determines whether the object Prefab asset contains any MonoBehaviours with missing SerializeReference types.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor
public static bool HasManagedReferencesWithMissingTypes(Object assetComponentOrGameObject)
Parameters
Returns
Type | Description |
|---|---|
| bool | Returns true if there are missing SerializeReference types directly within a Prefab asset excluding nested Prefab. |
Remarks
This method returns true if the prefab asset contains missing SerializeReference types. Applying property modifications to a prefab asset removes missing type information from the prefab asset. However, editing a prefab asset in prefab editing mode preserves missing type information. If you are on an instance, you can use PrefabUtility.GetCorrespondingObjectFromSource to validate if the prefab asset has missing types. Additional Resources: SerializationUtility.HasManagedReferencesWithMissingTypes, SerializeReference