C# 클래스 LeopotamGroup.Pooling.PoolContainer

Pool container. Supports spawning of named prefab from Resources folder.
상속: UnityEngine.MonoBehaviour
파일 보기 프로젝트 열기: Leopotam/LeopotamGroupLibraryUnity 1 사용 예제들

공개 메소드들

메소드 설명
CreatePool ( string prefabPath, Transform itemsRoot = null ) : PoolContainer

Creates new pool container for specified prefab.

Get ( ) : IPoolObject

Get new instance of prefab from pool.

Get ( bool &isNew ) : IPoolObject

Get new instance of prefab from pool.

Recycle ( IPoolObject obj ) : void

Recycle specified instance to pool.

비공개 메소드들

메소드 설명
LoadPrefab ( ) : bool

메소드 상세

CreatePool() 공개 정적인 메소드

Creates new pool container for specified prefab.
public static CreatePool ( string prefabPath, Transform itemsRoot = null ) : PoolContainer
prefabPath string Prefab path at Resources folder.
itemsRoot UnityEngine.Transform Root for new items.
리턴 PoolContainer

Get() 공개 메소드

Get new instance of prefab from pool.
public Get ( ) : IPoolObject
리턴 IPoolObject

Get() 공개 메소드

Get new instance of prefab from pool.
public Get ( bool &isNew ) : IPoolObject
isNew bool Is instance was created during this call.
리턴 IPoolObject

Recycle() 공개 메소드

Recycle specified instance to pool.
public Recycle ( IPoolObject obj ) : void
obj IPoolObject Instance to recycle.
리턴 void