public void NotifyLayerIndexChange() { int count = m_rootNodes.Count; for (int i = 0; i < count; i++) { Node node = m_rootNodes[i]; StateLayer layer = node.context.GetLayer(); if (layer != null) { node.rootIndex = layer.get_index(); } } m_rootNodes.Sort(m_rootNodeComparer); m_updateOrder = true; }