Exemple #1
0
        void RestoreAssetsFromBackup()
        {
            if (m_VisualTreeAsset != null && m_VisualTreeAssetBackup != null)
            {
                m_VisualTreeAssetBackup.DeepOverwrite(m_VisualTreeAsset);
            }

            if (m_MainStyleSheet != null && m_MainStyleSheetBackup != null)
            {
                m_MainStyleSheetBackup.DeepOverwrite(m_MainStyleSheet);
            }
        }
        public static StyleSheet DeepCopy(this StyleSheet styleSheet)
        {
            if (styleSheet == null)
            {
                return(null);
            }

            var newStyleSheet = StyleSheetUtilities.CreateInstance();

            styleSheet.DeepOverwrite(newStyleSheet);

            return(newStyleSheet);
        }