C# 클래스 UnityPooler.PoolableGameObject

This class is a required component for any prefab that is to be pooled
상속: UnityEngine.MonoBehaviour
파일 보기 프로젝트 열기: GalvanicGames/unity-pooler 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
capAmount int
onObjectCreation System.Action
persistAcrossScenes bool
releaseOnSceneTransition bool
useCap bool

Private Properties

프로퍼티 타입 설명
Awake void
Clear void
Initialize void
OnDestroy void
ReleaseObjects void
ReuseObject PoolableGameObject
SceneTransitioning void
SendCreationMessage void

공개 메소드들

메소드 설명
AddToPool ( int numberToAdd ) : void

Adds 'numberToAdd' to the pool.

AmountInPool ( ) : int

Count of GameObjects currently in the pool.

Get ( ) : PoolableGameObject

Returns an object from the pool

IncrementPool ( ) : void

Adds one object to the pool

PopulatePool ( int numberToPopulate ) : void

Populates the pool up to 'numberToPopulate' will not add to the pool past that count.

Release ( ) : void

Releases an object back to the pool.

ReleaseObjectsAndClearPool ( ) : void

비공개 메소드들

메소드 설명
Awake ( ) : void
Clear ( ) : void

Completely resets the pool. Live objects are on their own but pooled objects will be destroyed.

Initialize ( ) : void
OnDestroy ( ) : void
ReleaseObjects ( ) : void
ReuseObject ( ) : PoolableGameObject
SceneTransitioning ( Scene from, Scene to ) : void
SendCreationMessage ( PoolableGameObject newObj ) : void

메소드 상세

AddToPool() 공개 메소드

Adds 'numberToAdd' to the pool.
public AddToPool ( int numberToAdd ) : void
numberToAdd int Amount to add to the pool.
리턴 void

AmountInPool() 공개 메소드

Count of GameObjects currently in the pool.
public AmountInPool ( ) : int
리턴 int

Get() 공개 메소드

Returns an object from the pool
public Get ( ) : PoolableGameObject
리턴 PoolableGameObject

IncrementPool() 공개 메소드

Adds one object to the pool
public IncrementPool ( ) : void
리턴 void

PopulatePool() 공개 메소드

Populates the pool up to 'numberToPopulate' will not add to the pool past that count.
public PopulatePool ( int numberToPopulate ) : void
numberToPopulate int Amount to bring the pool up to.
리턴 void

Release() 공개 메소드

Releases an object back to the pool.
public Release ( ) : void
리턴 void

ReleaseObjectsAndClearPool() 공개 메소드

public ReleaseObjectsAndClearPool ( ) : void
리턴 void

프로퍼티 상세

capAmount 공개적으로 프로퍼티

If there is a cap then what is that cap amount?
public int capAmount
리턴 int

onObjectCreation 공개적으로 정적으로 프로퍼티

Attach to be invoked when a new GameObject is created.
public static System.Action onObjectCreation
리턴 System.Action

persistAcrossScenes 공개적으로 프로퍼티

Should the pooled objects persist across scenes? Otherwise the pool is torn down when the next scene is loaded.
public bool persistAcrossScenes
리턴 bool

releaseOnSceneTransition 공개적으로 프로퍼티

If we persist across scenes then should all live objects be released back into the pool?
public bool releaseOnSceneTransition
리턴 bool

useCap 공개적으로 프로퍼티

Is there a cap for this pool?
public bool useCap
리턴 bool