public RiderFlowSceneToolbarRoot() { SetRootStyleProperties(); var startupLabel = new Label("Initializing..."); Add(startupLabel); ContainerReadyRequirement.Instance.IsReady.WhenTrue(myDefinition.Lifetime, (b) => { Remove(startupLabel); myRiderFlowToolbarElements = new List <VisualElement>() { ComponentContainer.GetComponent <SceneSearchPopupTool>().MakeVisualElement(myDefinition.Lifetime), ComponentContainer.GetComponent <CameraPresetCreationTool>().MakeVisualElement(), ComponentContainer.GetComponent <CameraPresetExplorerTool>().MakeVisualElement(), ComponentContainer.GetComponent <BookmarkExplorerTool>().MakeVisualElement(), }; foreach (var toolbarElement in myRiderFlowToolbarElements) { Add(toolbarElement); } RegisterCallback <GeometryChangedEvent>(OnGeometryChanged); myParentSet.Advise(myDefinition.Lifetime, SetUpChildElements); mySceneOccurrenceExplorerTool = ComponentContainer.GetComponent <SceneOccurrenceExplorerTool>(); mySceneOccurrenceExplorerTool.Session.Advise(myDefinition.Lifetime, session => { if (!myShowingFindUsages) { AddFindUsages(); } }); RegisterCallback <DetachFromPanelEvent>(OnDestroy); }); }
public void Persist(ComponentContainer <IComponent> data, string name) { if (!_wrappers_dict.ContainsKey(name)) { _wrappers_dict.Add(name, new ComponentIOWrapper(data)); } else { _wrappers_dict[name].Set(data.GetComponent()); } }
public override IComponent GetComponent() { return(data.GetComponent()); }
public T GetComponent <T>() { return(components.GetComponent <T>()); }