ドキュメント

Unity Engine

Unity Engine

HasManagedReferencesWithMissingTypes(Object)

Determines whether the object Prefab asset contains any MonoBehaviours with missing SerializeReference types.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public static bool HasManagedReferencesWithMissingTypes(Object assetComponentOrGameObject)

Parameters

assetComponentOrGameObject

Returns

Type

Description

boolReturns 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