C# Class Duality.Resources.Prefab

Inheritance: Resource
Afficher le fichier Open project: BraveSirAndrew/duality Class Usage Examples

Méthodes publiques

Méthode Description
CopyTo ( GameObject obj ) : void

Copies this Prefabs data to a GameObject without linking itsself to it.

CopyTo ( IEnumerable baseObjAddress, Component target ) : void

Copies a subset of this Prefabs data to a specific Component.

HasComponent ( IEnumerable gameObjIndexPath, Type cmpType ) : bool

Returns whether this Prefab contains a Component inside a GameObject with the specified index path. It is based on this Prefabs root GameObject.

HasGameObject ( IEnumerable indexPath ) : bool

Returns whether this Prefab contains a GameObject with the specified index path. It is based on this Prefabs root GameObject.

Inject ( GameObject obj ) : void

Discards previous data and injects the specified GameObject into the Prefab. The GameObject itsself will not be affected, instead a GameObject.Clone of it will be used for the Prefab.

Instantiate ( ) : GameObject

Instantiates the Prefab.

Prefab ( ) : System

Creates a new, empty Prefab.

Prefab ( GameObject obj ) : System

Creates a new Prefab out of a GameObject.

Méthodes protégées

Méthode Description
OnCopyTo ( Resource r, CloneProvider provider ) : void
OnLoaded ( ) : void

Method Details

CopyTo() public méthode

Copies this Prefabs data to a GameObject without linking itsself to it.
public CopyTo ( GameObject obj ) : void
obj GameObject The GameObject to which the Prefabs data is copied.
Résultat void

CopyTo() public méthode

Copies a subset of this Prefabs data to a specific Component.
public CopyTo ( IEnumerable baseObjAddress, Component target ) : void
baseObjAddress IEnumerable The GameObject IndexPath to locate the source Component
target Component The Component to which the Prefabs data is copied.
Résultat void

HasComponent() public méthode

Returns whether this Prefab contains a Component inside a GameObject with the specified index path. It is based on this Prefabs root GameObject.
public HasComponent ( IEnumerable gameObjIndexPath, Type cmpType ) : bool
gameObjIndexPath IEnumerable The index path at which to search for a GameObject.
cmpType System.Type The Component type to search for inside the found GameObject.
Résultat bool

HasGameObject() public méthode

Returns whether this Prefab contains a GameObject with the specified index path. It is based on this Prefabs root GameObject.
public HasGameObject ( IEnumerable indexPath ) : bool
indexPath IEnumerable The index path at which to search for a GameObject.
Résultat bool

Inject() public méthode

Discards previous data and injects the specified GameObject into the Prefab. The GameObject itsself will not be affected, instead a GameObject.Clone of it will be used for the Prefab.
public Inject ( GameObject obj ) : void
obj GameObject The object to inject as Prefab root object.
Résultat void

Instantiate() public méthode

Instantiates the Prefab.
public Instantiate ( ) : GameObject
Résultat GameObject

OnCopyTo() protected méthode

protected OnCopyTo ( Resource r, CloneProvider provider ) : void
r Resource
provider CloneProvider
Résultat void

OnLoaded() protected méthode

protected OnLoaded ( ) : void
Résultat void

Prefab() public méthode

Creates a new, empty Prefab.
public Prefab ( ) : System
Résultat System

Prefab() public méthode

Creates a new Prefab out of a GameObject.
public Prefab ( GameObject obj ) : System
obj GameObject
Résultat System