void RemoveStyleSheetsFromRootAsset(VisualElementAsset rootAsset) { if (rootAsset.fullTypeName == BuilderConstants.SelectedVisualTreeAssetSpecialElementTypeName) { return; } for (int i = 0; i < m_OpenUSSFiles.Count; ++i) { var localUssPath = m_OpenUSSFiles[i].assetPath; if (string.IsNullOrEmpty(localUssPath)) { continue; } rootAsset.RemoveStyleSheet(m_OpenUSSFiles[i].styleSheet); rootAsset.RemoveStyleSheetPath(localUssPath); } }