Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Factory : PlaceholderFactory<CardViewCellProtocol, CardViewCell>
- {
- }
- public class Pool : MonoPoolableMemoryPool<CardViewCellProtocol, IMemoryPool, CardViewCell>
- {
- }
- public static void InitPool(DiContainer container)
- {
- container
- .BindFactory<CardViewCellProtocol, CardViewCell, Factory>()
- .FromPoolableMemoryPool<CardViewCellProtocol, CardViewCell, Pool>(poolBinder =>
- poolBinder
- .WithInitialSize(5)
- .FromComponentInNewPrefabResource($"Elements/{nameof(CardViewCell)}")
- .UnderTransformGroup(nameof(CardViewCell)));
- }
Advertisement
Add Comment
Please, Sign In to add comment