public void RegisterVisualTreeAssetTracker(ILiveReloadAssetTracker <VisualTreeAsset> tracker, VisualElement rootElement)
        {
            if (panel.contextType == ContextType.Editor)
            {
                m_EditorVisualTreeAssetTracker = tracker;
            }
            else
            {
                m_RuntimeVisualTreeAssetTrackers[rootElement] = tracker;

                // Add template container to be able to track newly created uxml assets
                if (rootElement is TemplateContainer container && container.templateSource != null)
                {
                    StartVisualTreeAssetTracking(tracker, container.templateSource);
                }

                // The enablement of Live Reload for panels of type ContextType.Player depends on the preference set
                // for the Game View itself.
                enable = DefaultEditorWindowBackend.IsGameViewWindowLiveReloadOn();
            }
        }
Пример #2
0
 public EditorWindowVisualTreeAssetTracker(DefaultEditorWindowBackend owner)
 {
     m_Owner = owner;
 }