public void Init(Rect rect, List <T> objects) { if (Root != null || StackQTNode.Count != 0) { Debug.LogError("QuadTree inited"); Clear(); } Root = new QuadTreeNode <T>(rect); for (int i = 0; i < objects.Count; i++) { Root.Fill(objects[i]); } }