Version: 5.3 (switch to 5.4b)
IdiomaEnglish
  • C#
  • JS

Idioma de script

Selecciona tu lenguaje de programación favorito. Todos los fragmentos de código serán mostrados en este lenguaje.

PrefabUtility

class in UnityEditor

Sugiere un cambio

¡Éxito!

Gracias por ayudarnos a mejorar la calidad de la documentación de Unity. A pesar de que no podemos aceptar todas las sugerencias, leemos cada cambio propuesto por nuestros usuarios y actualizaremos los que sean aplicables.

Cerrar

No se puedo enviar

Por alguna razón su cambio sugerido no pudo ser enviado. Por favor <a>intente nuevamente</a> en unos minutos. Gracias por tomarse un tiempo para ayudarnos a mejorar la calidad de la documentación de Unity.

Cerrar

Cancelar

Cambiar al Manual

Descripción

Utility class for any prefab related operations.

Variables Estáticas

prefabInstanceUpdatedCalled after prefab instances in the scene have been updated.

Funciones Estáticas

ConnectGameObjectToPrefabConnects the source prefab to the game object.
CreateEmptyPrefabCrea un prefab vacío en la ruta indicada.
CreatePrefabCreates a prefab from a game object hierarchy.
DisconnectPrefabInstanceDisconnects the prefab instance from its parent prefab.
FindPrefabRootHelper function to find the prefab root of an object (used for picking niceness).
FindRootGameObjectWithSameParentPrefabReturns the topmost game object that has the same prefab parent as target.
FindValidUploadPrefabInstanceRootReturns root game object of the prefab instance if that root prefab instance is a parent of the prefab.
GetPrefabObjectRetrieves the enclosing prefab for any object contained within.
GetPrefabParentReturns the parent asset object of source, or null if it can't be found.
GetPrefabTypeGiven an object, returns its prefab type (None, if it's not a prefab).
GetPropertyModificationsExtract all modifications that are applied to the prefab instance compared to the parent prefab.
InstantiateAttachedAssetInstantiate an asset that is referenced by a prefab and use it on the prefab instance.
InstantiatePrefabInstantiates the given prefab in a given scene.
MergeAllPrefabInstancesForce re-merging all prefab instances of this prefab.
ReconnectToLastPrefabConnects the game object to the prefab that it was last connected to.
RecordPrefabInstancePropertyModificationsForce record property modifications by comparing against the parent prefab.
ReplacePrefabReplaces the targetPrefab with a copy of the game object hierarchy go.
ResetToPrefabStateResets the properties of the component or game object to the parent prefab state.
RevertPrefabInstanceResets the properties of all objects in the prefab, including child game objects and components that were added to the prefab instance.
SetPropertyModificationsAssigns all modifications that are applied to the prefab instance compared to the parent prefab.

Delegados

PrefabInstanceUpdatedDelegate for method that is called after prefab instances in the scene have been updated.