public void OnAfterBuilderDeserialize(VisualElement documentElement) { // Fix unserialized rule references in Selectors in StyleSheets. // VTA.inlineSheet only has Rules so it does not need this fix. if (m_MainStyleSheet != null) { m_MainStyleSheet.FixRuleReferences(); } ReloadDocumentToCanvas(documentElement); }
public static void DeepOverwrite(this StyleSheet styleSheet, StyleSheet other) { var json = JsonUtility.ToJson(styleSheet); JsonUtility.FromJsonOverwrite(json, other); other.FixRuleReferences(); other.name = styleSheet.name; }