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);
 }
Exemplo 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();
 }
Exemplo n.º 4
0
        private IInspectorBackend <Entity> GetBackend(InspectorBackendType type)
        {
            switch (type)
            {
            case InspectorBackendType.UIElements:
            {
                return(new UIElementsBackend(m_Session, RootElement)
                    {
                        Mode = m_Mode
                    });
            }

            default:
                throw new ArgumentException("Unknown InspectorBackendType", nameof(type));
            }
        }