Example #1
0
        void Clear()
        {
            ClearUndo();

            ClearBackups();
            m_OpenendVisualTreeAssetOldPath = string.Empty;
            m_OpenendMainStyleSheetOldPath  = string.Empty;

            if (m_VisualTreeAsset != null)
            {
                if (!AssetDatabase.Contains(m_VisualTreeAsset))
                {
                    m_VisualTreeAsset.Destroy();
                }

                m_VisualTreeAsset = null;
            }

            if (m_MainStyleSheet != null)
            {
                if (!AssetDatabase.Contains(m_MainStyleSheet))
                {
                    m_MainStyleSheet.Destroy();
                }

                m_MainStyleSheet = null;
            }

            m_Settings = null;
        }
Example #2
0
        void ClearBackups()
        {
            m_VisualTreeAssetBackup.Destroy();
            m_VisualTreeAssetBackup = null;

            m_MainStyleSheetBackup.Destroy();
            m_MainStyleSheetBackup = null;
        }