C# 클래스 Duality.Resources.PrefabLink

Represents a GameObject">GameObjects connection to the
파일 보기 프로젝트 열기: BraveSirAndrew/duality 1 사용 예제들

공개 메소드들

메소드 설명
AffectsObject ( Component cmp ) : bool

Returns whether a specific object is affected by this PrefabLink.

AffectsObject ( GameObject obj ) : bool

Returns whether a specific object is affected by this PrefabLink.

Apply ( ) : void

Applies both Prefab and change list to this PrefabLinks GameObject.

ApplyAllLinks ( IEnumerable objEnum, Predicate predicate = null ) : List

Applies all PrefabLinks in a set of GameObjects.

ApplyChanges ( ) : void

Applies this PrefabLinks change list to its GameObject. This will restore all deliberate modifications (made in the editor) of the GameObjects Properties after linking it to the Prefab.

ApplyPrefab ( ) : void

Applies the Prefab to this PrefabLinks GameObject. This will overwrite all of its existing data and establish the state as defined in the Prefab.

ClearChanges ( ) : void

Clears the change list.

ClearChanges ( GameObject targetObj, Type cmpType, PropertyInfo prop ) : void

Clears the change list for certain objects

Clone ( ) : PrefabLink

Clones the PrefabLink.

Clone ( GameObject newObj ) : PrefabLink

Clones the PrefabLink, but targets a different GameObject.

Clone ( GameObject newObj, ContentRef newPrefab ) : PrefabLink

Clones the PrefabLink, but targets a different GameObject and Prefab.

HasChange ( object target, PropertyInfo prop ) : bool

Returns whether there is a specific change list entry.

PopChange ( object target, PropertyInfo prop ) : void

Removes an existing change list entry.

PrefabLink ( GameObject obj, ContentRef prefab ) : System

Creates a new PrefabLink, connecting a GameObject to a Prefab.

PushChange ( object target, PropertyInfo prop ) : void

Creates a new change list entry.

PushChange ( object target, PropertyInfo prop, object value ) : void

Creates a new change list entry.

RelocateChanges ( PrefabLink other ) : void

Relocates the internal change list from this PrefabLink to a different, hierarchially lower PrefabLink.

In general, each PrefabLink is responsible for all hierarchially lower GameObjects. If one of them has a PrefabLink on its own, then the higher PrefabLinks responsibility ends there.

Change relocation is done when linking an existing GameObject to a Prefab although it is already affected by a hierarchially higher PrefabLink. In order to prevent both PrefabLinks to interfere with each other, all higher PrefabLink change list entries referring to that GameObject are relocated to the new, lower PrefabLink that is specifically targetting it.

This way, the above responsibility guideline remains applicable.

UpdateChanges ( ) : void

Updates all existing change list entries by the GameObjects current Property values.

비공개 메소드들

메소드 설명
Apply ( bool deep ) : void
ClearEmptyChanges ( ) : void
ICloneExplicit ( object targetObj, CloneProvider provider ) : void
PopChange ( IEnumerable indexPath, PropertyInfo prop, Type componentType = null ) : void
PrefabLink ( ) : System

메소드 상세

AffectsObject() 공개 메소드

Returns whether a specific object is affected by this PrefabLink.
public AffectsObject ( Component cmp ) : bool
cmp Component
리턴 bool

AffectsObject() 공개 메소드

Returns whether a specific object is affected by this PrefabLink.
public AffectsObject ( GameObject obj ) : bool
obj GameObject
리턴 bool

Apply() 공개 메소드

Applies both Prefab and change list to this PrefabLinks GameObject.
public Apply ( ) : void
리턴 void

ApplyAllLinks() 공개 정적인 메소드

Applies all PrefabLinks in a set of GameObjects.
public static ApplyAllLinks ( IEnumerable objEnum, Predicate predicate = null ) : List
objEnum IEnumerable An enumeration of all GameObjects containing PrefabLinks that are to apply.
predicate Predicate An optional predicate. If set, only PrefabLinks meeting its requirements are applied.
리턴 List

ApplyChanges() 공개 메소드

Applies this PrefabLinks change list to its GameObject. This will restore all deliberate modifications (made in the editor) of the GameObjects Properties after linking it to the Prefab.
public ApplyChanges ( ) : void
리턴 void

ApplyPrefab() 공개 메소드

Applies the Prefab to this PrefabLinks GameObject. This will overwrite all of its existing data and establish the state as defined in the Prefab.
public ApplyPrefab ( ) : void
리턴 void

ClearChanges() 공개 메소드

Clears the change list.
public ClearChanges ( ) : void
리턴 void

ClearChanges() 공개 메소드

Clears the change list for certain objects
public ClearChanges ( GameObject targetObj, Type cmpType, PropertyInfo prop ) : void
targetObj GameObject
cmpType System.Type
prop System.Reflection.PropertyInfo
리턴 void

Clone() 공개 메소드

Clones the PrefabLink.
public Clone ( ) : PrefabLink
리턴 PrefabLink

Clone() 공개 메소드

Clones the PrefabLink, but targets a different GameObject.
public Clone ( GameObject newObj ) : PrefabLink
newObj GameObject The GameObject which the clone is connected to.
리턴 PrefabLink

Clone() 공개 메소드

Clones the PrefabLink, but targets a different GameObject and Prefab.
public Clone ( GameObject newObj, ContentRef newPrefab ) : PrefabLink
newObj GameObject The GameObject which the clone is connected to.
newPrefab ContentRef The Prefab which the clone will connect its GameObject to.
리턴 PrefabLink

HasChange() 공개 메소드

Returns whether there is a specific change list entry.
public HasChange ( object target, PropertyInfo prop ) : bool
target object The target object in which the change has been made. Must be a GameObject or Component.
prop System.Reflection.PropertyInfo The target objects Property that has been changed.
리턴 bool

PopChange() 공개 메소드

Removes an existing change list entry.
public PopChange ( object target, PropertyInfo prop ) : void
target object The target object in which the change has been made. Must be a GameObject or Component.
prop System.Reflection.PropertyInfo The target objects Property that has been changed.
리턴 void

PrefabLink() 공개 메소드

Creates a new PrefabLink, connecting a GameObject to a Prefab.
public PrefabLink ( GameObject obj, ContentRef prefab ) : System
obj GameObject The GameObject to link.
prefab ContentRef The Prefab to connect the GameObject with.
리턴 System

PushChange() 공개 메소드

Creates a new change list entry.
public PushChange ( object target, PropertyInfo prop ) : void
target object The target object in which the change has been made. Must be a GameObject or Component.
prop System.Reflection.PropertyInfo The target objects Property that has been changed.
리턴 void

PushChange() 공개 메소드

Creates a new change list entry.
public PushChange ( object target, PropertyInfo prop, object value ) : void
target object The target object in which the change has been made. Must be a GameObject or Component.
prop System.Reflection.PropertyInfo The target objects Property that has been changed.
value object The value to which the specified Property has been changed to.
리턴 void

RelocateChanges() 공개 메소드

Relocates the internal change list from this PrefabLink to a different, hierarchially lower PrefabLink.

In general, each PrefabLink is responsible for all hierarchially lower GameObjects. If one of them has a PrefabLink on its own, then the higher PrefabLinks responsibility ends there.

Change relocation is done when linking an existing GameObject to a Prefab although it is already affected by a hierarchially higher PrefabLink. In order to prevent both PrefabLinks to interfere with each other, all higher PrefabLink change list entries referring to that GameObject are relocated to the new, lower PrefabLink that is specifically targetting it.

This way, the above responsibility guideline remains applicable.

public RelocateChanges ( PrefabLink other ) : void
other PrefabLink /// The PrefabLink to which to relocate changes. It needs to be hierarchially lower than /// this one for the relocation to succeed. ///
리턴 void

UpdateChanges() 공개 메소드

Updates all existing change list entries by the GameObjects current Property values.
public UpdateChanges ( ) : void
리턴 void