void OnEnable () { UpdatePosition(); if (root == null) { root = this; } else { next = root; root.prev = this; root = this; } }
void OnDisable () { if (root == this) { root = next; if (root != null) root.prev = null; } else { if (prev != null) prev.next = next; if (next != null) next.prev = prev; } prev = null; next = null; }