private IInspectorBackend GetBackend(InspectorBackendType type)
        {
            var root = this.GetRootVisualContainer();

            root.Clear();

            IInspectorBackend backend = null;

            switch (type)
            {
            case InspectorBackendType.IMGUI:
                backend = new IMGUIBackend(this);
                break;

            case InspectorBackendType.UIElements:
                backend = new UIElementsBackend(this);
                break;

            default:
                throw new ArgumentException("Unknown InspectorBackendType", nameof(type));
            }
            backend.Mode = m_Mode;
            backend.Build();
            return(backend);
        }
 public void SwitchToBackend(InspectorBackendType type, bool force = false)
 {
     if (type == m_BackendType && !force)
     {
         return;
     }
     m_BackendType = type;
     m_Backend     = GetBackend(m_BackendType);
 }
Ejemplo n.º 3
0
 private void SwitchToBackend(InspectorBackendType type, bool force = false)
 {
     if (type == m_BackendType && !force)
     {
         return;
     }
     m_BackendType = type;
     m_Backend     = GetBackend(m_BackendType);
     m_Backend.OnCreated();
     Refresh();
 }