/// Destroys the pool and all resources+objects owned by it. /// The pool is no longer usable after this. public void Destroy() { m_owner = null; foreach (var batch in m_Batches) { batch.Destroy(); } m_Batches = null; }
void Awake() { // Canvases might be dynamically created, so we can't rely on them all // being initialized at App-init time. Init(); m_BatchManager = new BatchManager(); if (m_BatchKeywords != null) { m_BatchManager.MaterialKeywords.AddRange(m_BatchKeywords); } m_BatchManager.Init(this); }
public BatchPool(BatchManager owner) { m_owner = owner; }