This is the controller class that the framework builds on. Built on Monobehaviour
, it provides access to views.
public UIDocument Target { get; private set; }
The target UIDocument
that the views will be spawned into.
public void RegisterView(UIView view)
Used internally by UIViews to register themselves. Internally, they are stored in a List<UIView>
. It is not recommended to use this method.
public void ShowView(string viewID)
Displays the view on the target's hierarchy.
It simply calls the specified View's ShowView().
public void HideView(string viewID)
Hides the view, and removes it from the hierarchy.
It simply calls the specified View's HideView().
public VisualElement GetTargetContainer(string containerID)
Gets the VisualElement with the specified ID. Shorthand convenience method for visualElement.Q<>()
.
If the specified VisualElement could not be found, logs an error to the console.