public virtual void Init() { for (int i = 0; i < ActiveInstanceList.Count; i++) { ReturnInstance(ActiveInstanceList[i]); } ActiveInstanceList.Clear(); totalObjectCount = 0; for (int i = 0; i < startGenerateNum; i++) { GenerateAtLast(); } }
public virtual void SetOriginal(T original) { if (original.Equals(this.original)) { return; } this.original = original; for (int i = 0; i < InstanceList.Count; i++) { Destroy(InstanceList[i].gameObject); } InstanceList.Clear(); ActiveInstanceList.Clear(); deactiveInstanceList.Clear(); }