protected virtual void OnEnable()
        {
            hideFlags = HideFlags.DontSave;
            this.SetAntiAliasing(4);

            ResolveDependencies();

            var root = m_ResourceLoader.GetTemplate("PackageManagerFiltersWindow.uxml");

            root.styleSheets.Add(m_ResourceLoader.GetFiltersWindowStyleSheet());
            cache = new VisualElementCache(root);

            rootVisualElement.Add(root);
            root.StretchToParentSize();

            m_Container = cache.Get <VisualElement>("mainContainer");
        }
Exemple #2
0
        private void OnEnable()
        {
            hideFlags = HideFlags.DontSave;
            this.SetAntiAliasing(4);

            var windowResource = Resources.GetVisualTreeAsset("PackageManagerFiltersWindow.uxml");

            if (windowResource != null)
            {
                var root = windowResource.Instantiate();
                root.styleSheets.Add(Resources.GetFiltersWindowStyleSheet());
                cache = new VisualElementCache(root);

                rootVisualElement.Add(root);
                root.StretchToParentSize();

                m_Container = cache.Get <VisualElement>("mainContainer");
            }
        }