void UnregisterCallbacks(DetachFromPanelEvent evt)
 {
     UnregisterCallback <DetachFromPanelEvent>(UnregisterCallbacks);
     BuilderAssetModificationProcessor.Unregister(this);
     if (m_ThemeManager != null)
     {
         BuilderAssetPostprocessor.Unregister(m_ThemeManager);
     }
 }
 static BuilderLibraryContent()
 {
     RegenerateLibraryContent();
     BuilderAssetModificationProcessor.Register(new AssetModificationProcessor(() =>
     {
         if (s_ProjectUxmlPathsHash != s_ProjectAssetsScanner.GetAllProjectUxmlFilePathsHash())
         {
             RegenerateLibraryContent();
         }
     }));
 }
Exemplo n.º 3
0
        public BuilderLibrary(
            BuilderPaneWindow paneWindow, BuilderViewport viewport,
            BuilderSelection selection, BuilderLibraryDragger dragger,
            BuilderTooltipPreview tooltipPreview)
        {
            m_PaneWindow      = paneWindow;
            m_DocumentElement = viewport.documentElement;
            m_Selection       = selection;
            m_Dragger         = dragger;
            m_TooltipPreview  = tooltipPreview;

            AddToClassList(s_UssClassName);

            BuilderAssetModificationProcessor.Register(this);

            RefreshTreeView();
        }
Exemplo n.º 4
0
 void UnregisterCallbacks(DetachFromPanelEvent evt)
 {
     UnregisterCallback <DetachFromPanelEvent>(UnregisterCallbacks);
     BuilderAssetModificationProcessor.Unregister(this);
 }