Search Results for

    Show / Hide Table of Contents

    Class PrefabWindow

    Prefab window allows to view and edit Prefab asset.

    Inheritance
    System.Object
    Control
    ContainerControl
    FlaxEngine.GUI.ScrollableControl
    Panel
    DockWindow
    EditorWindow
    AssetEditorWindow
    AssetEditorWindowBase<Prefab>
    PrefabWindow
    Implements
    System.IComparable
    IDrawable
    IEditable
    IPresenterOwner
    ISceneEditingContext
    Inherited Members
    AssetEditorWindowBase<Prefab>._isWaitingForLoaded
    AssetEditorWindowBase<Prefab>._asset
    AssetEditorWindowBase<Prefab>.RefreshAsset()
    AssetEditorWindowBase<Prefab>.ReloadAsset()
    AssetEditorWindowBase<Prefab>.LoadAsset()
    AssetEditorWindowBase<Prefab>.OnAssetLinked()
    AssetEditorWindowBase<Prefab>.OnAssetLoadFailed()
    AssetEditorWindowBase<Prefab>.OnShow()
    AssetEditorWindowBase<Prefab>.OnItemReimported(ContentItem)
    AssetEditorWindowBase<Prefab>.Asset
    AssetEditorWindow._item
    AssetEditorWindow._toolstrip
    AssetEditorWindow.UpdateTitle()
    AssetEditorWindow.IsEditingItem(ContentItem)
    AssetEditorWindow.OnClosing(ClosingReason)
    AssetEditorWindow.OnClose()
    AssetEditorWindow.MarkAsEdited()
    AssetEditorWindow.ClearEditedFlag()
    AssetEditorWindow.OnEditedStateChanged()
    AssetEditorWindow.OnShowContextMenu(ContextMenu)
    AssetEditorWindow.OnItemDeleted(ContentItem)
    AssetEditorWindow.OnItemRenamed(ContentItem)
    AssetEditorWindow.OnItemDispose(ContentItem)
    AssetEditorWindow.Item
    AssetEditorWindow.ToolStrip
    AssetEditorWindow.SerializationTypename
    AssetEditorWindow.WindowTitleName
    AssetEditorWindow.IsEdited
    AssetEditorWindow.OnEdited
    EditorWindow.Editor
    EditorWindow.OnSceneSaving(Scene, Guid)
    EditorWindow.OnSceneSaved(Scene, Guid)
    EditorWindow.OnSceneSaveError(Scene, Guid)
    EditorWindow.OnSceneLoading(Scene, Guid)
    EditorWindow.OnSceneLoaded(Scene, Guid)
    EditorWindow.OnSceneLoadError(Scene, Guid)
    EditorWindow.OnSceneUnloading(Scene, Guid)
    EditorWindow.OnSceneUnloaded(Scene, Guid)
    EditorWindow.OnPlayBeginning()
    EditorWindow.OnPlayBegin()
    EditorWindow.OnPlayEnd()
    EditorWindow.OnInit()
    EditorWindow.OnUpdate()
    EditorWindow.OnExit()
    EditorWindow.OnEditorStateChanged()
    EditorWindow.OnKeyDown(KeyboardKeys)
    EditorWindow.CanOpenContentFinder
    EditorWindow.CanUseNavigation
    DockWindow._masterPanel
    DockWindow._dockedTo
    DockWindow.InputActions
    DockWindow.ShowFloating()
    DockWindow.ShowFloating(WindowStartPosition)
    DockWindow.ShowFloating(Float2, WindowStartPosition)
    DockWindow.ShowFloating(Float2, Float2, WindowStartPosition)
    DockWindow.Show(DockState, DockPanel, Boolean, Nullable<Single>)
    DockWindow.Show(DockState, DockWindow)
    DockWindow.FocusOrShow()
    DockWindow.FocusOrShow(DockState)
    DockWindow.Hide()
    DockWindow.Close(ClosingReason)
    DockWindow.SelectTab(Boolean)
    DockWindow.BringToFront()
    DockWindow.OnUnlink()
    DockWindow.Undock()
    DockWindow.LayoutSerializeSplitter(XmlWriter, String, SplitPanel)
    DockWindow.LayoutDeserializeSplitter(XmlElement, String, SplitPanel)
    DockWindow.Focus()
    DockWindow.PerformLayoutBeforeChildren()
    DockWindow.HideOnClose
    DockWindow.MasterPanel
    DockWindow.ParentDockPanel
    DockWindow.IsDocked
    DockWindow.IsSelected
    DockWindow.IsHidden
    DockWindow.DefaultSize
    DockWindow.Title
    DockWindow.Icon
    DockWindow.TitleSize
    Panel.SetViewOffset(Float2)
    Panel.FastScroll()
    Panel.ScrollViewTo(Control, Boolean)
    Panel.ScrollViewTo(Float2, Boolean)
    Panel.ScrollViewTo(Rectangle, Boolean)
    Panel.OnMouseDown(Float2, MouseButton)
    Panel.OnMouseWheel(Float2, Single)
    Panel.RemoveChildren()
    Panel.DisposeChildren()
    Panel.OnChildResized(Control)
    Panel.Draw()
    Panel.ContainsPoint(Float2, Boolean)
    Panel.IntersectsChildContent(Control, Float2, Float2)
    Panel.PerformLayout(Boolean)
    Panel.ArrangeAndGetBounds()
    Panel.Arrange()
    Panel.GetDesireClientArea(Rectangle)
    Panel.OnDragMove(Float2, DragData)
    Panel.ViewBottom
    Panel.ControlsBounds
    Panel.ScrollBars
    Panel.ScrollBarsSize
    Panel.AlwaysShowScrollbars
    Panel.ScrollMargin
    Panel.ScrollbarTrackColor
    Panel.ScrollbarThumbColor
    Panel.ScrollbarThumbSelectedColor
    ContainerControl._children
    ContainerControl._containsFocus
    ContainerControl._isLayoutLocked
    ContainerControl.LockChildrenRecursive()
    ContainerControl.UnlockChildrenRecursive()
    ContainerControl.AddChild<T>()
    ContainerControl.AddChild<T>(T)
    ContainerControl.RemoveChild(Control)
    ContainerControl.GetChild(Int32)
    ContainerControl.GetChild<T>()
    ContainerControl.GetChildIndex(Control)
    ContainerControl.GetChildIndexAt(Float2)
    ContainerControl.GetChildAt(Float2)
    ContainerControl.GetChildAt(Float2, Func<Control, Boolean>)
    ContainerControl.GetChildAtRecursive(Float2)
    ContainerControl.GetClientArea()
    ContainerControl.SortChildren()
    ContainerControl.SortChildrenRecursive()
    ContainerControl.OnChildrenChanged()
    ContainerControl.OnNavigate(NavDirection, Float2, Control, List<Control>)
    ContainerControl.CanNavigateChild(Control)
    ContainerControl.NavigationWrap(NavDirection, Float2, List<Control>, Float2)
    ContainerControl.UpdateContainsFocus()
    ContainerControl.UpdateChildrenBounds()
    ContainerControl.PerformLayoutAfterChildren()
    ContainerControl.ClearState()
    ContainerControl.DrawSelf()
    ContainerControl.DrawChildren()
    ContainerControl.RayCast(Float2, Control)
    ContainerControl.OnMouseEnter(Float2)
    ContainerControl.OnMouseMove(Float2)
    ContainerControl.OnMouseLeave()
    ContainerControl.OnMouseDoubleClick(Float2, MouseButton)
    ContainerControl.IsTouchPointerOver(Int32)
    ContainerControl.OnTouchEnter(Float2, Int32)
    ContainerControl.OnTouchDown(Float2, Int32)
    ContainerControl.OnTouchMove(Float2, Int32)
    ContainerControl.OnTouchUp(Float2, Int32)
    ContainerControl.OnTouchLeave(Int32)
    ContainerControl.OnCharInput(Char)
    ContainerControl.OnKeyUp(KeyboardKeys)
    ContainerControl.OnDragEnter(Float2, DragData)
    ContainerControl.OnDragLeave()
    ContainerControl.OnDragDrop(Float2, DragData)
    ContainerControl.OnSizeChanged()
    ContainerControl.Children
    ContainerControl.ChildrenCount
    ContainerControl.HasChildren
    ContainerControl.ContainsFocus
    ContainerControl.ClipChildren
    ContainerControl.CullChildren
    ContainerControl.IsTouchOver
    Control.Resize(Float2)
    Control.UpdateBounds()
    Control.UpdateTransform()
    Control.SetAnchorPreset(AnchorPresets, Boolean, Boolean)
    Control.Dispose()
    Control.Defocus()
    Control.OnGotFocus()
    Control.OnLostFocus()
    Control.OnStartContainsFocus()
    Control.OnEndContainsFocus()
    Control.Focus(Control)
    Control.StartMouseCapture(Boolean)
    Control.EndMouseCapture()
    Control.OnEndMouseCapture()
    Control.GetNavTarget(NavDirection)
    Control.GetNavOrigin(NavDirection)
    Control.NavigationFocus()
    Control.OnSubmit()
    Control.OnTouchLeave()
    Control.DoDragDrop(DragData)
    Control.LinkTooltip(String, Tooltip)
    Control.UnlinkTooltip()
    Control.OnShowTooltip(String, Float2, Rectangle)
    Control.OnTooltipShown(Tooltip)
    Control.OnTestTooltipOverControl(Float2)
    Control.IntersectsContent(Float2, Float2)
    Control.PointToParent(ContainerControl, Float2)
    Control.PointToParent(Float2)
    Control.PointToParent(Float2)
    Control.PointFromParent(Float2)
    Control.PointFromParent(Float2)
    Control.PointFromParent(ContainerControl, Float2)
    Control.PointToWindow(Float2)
    Control.PointFromWindow(Float2)
    Control.PointToScreen(Float2)
    Control.PointFromScreen(Float2)
    Control.OnLocationChanged()
    Control.SetScaleInternal(Float2)
    Control.SetPivotInternal(Float2)
    Control.SetShearInternal(Float2)
    Control.SetRotationInternal(Single)
    Control.OnVisibleChanged()
    Control.OnParentChangedInternal()
    Control.AddUpdateCallbacks(RootControl)
    Control.RemoveUpdateCallbacks(RootControl)
    Control.SetUpdate(Control.UpdateDelegate, Control.UpdateDelegate)
    Control.OnParentResized()
    Control.CompareTo(Object)
    Control.Compare(Control)
    Control.Top
    Control.Bottom
    Control.Left
    Control.Right
    Control.UpperLeft
    Control.UpperRight
    Control.BottomRight
    Control.BottomLeft
    Control.Scale
    Control.Pivot
    Control.Shear
    Control.Rotation
    Control.HasParent
    Control.BackgroundColor
    Control.BackgroundBrush
    Control.Enabled
    Control.EnabledInHierarchy
    Control.Visible
    Control.VisibleInHierarchy
    Control.IsDisposing
    Control.Root
    Control.RootWindow
    Control.DpiScale
    Control.ScreenPos
    Control.AutoFocus
    Control.IsFocused
    Control.IsNavFocused
    Control.IsMouseOver
    Control.IsDragOver
    Control.Tooltip
    Control.ShowTooltip
    Control.EditorBounds
    Control.LocationChanged
    Control.SizeChanged
    Control.ParentChanged
    Control.VisibleChanged
    Namespace: FlaxEditor.Windows.Assets
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public sealed class PrefabWindow : AssetEditorWindowBase<Prefab>, IComparable, IDrawable, IEditable, IContentItemOwner, IPresenterOwner, ISceneEditingContext

    Constructors

    PrefabWindow(Editor, AssetItem)

    Declaration
    public PrefabWindow(Editor editor, AssetItem item)
    Parameters
    Editor editor

    FlaxEditor.Content.AssetItem item

    Fields

    Graph

    The local scene nodes graph used by the prefab editor.

    Declaration
    public readonly LocalSceneGraph Graph
    Field Value
    FlaxEditor.SceneGraph.LocalSceneGraph

    Properties

    LiveReload

    Gets or sets a value indicating whether use live reloading for the prefab changes (applies prefab changes on modification by auto).

    Declaration
    public bool LiveReload { get; set; }
    Property Value
    System.Boolean

    LiveReloadTimeout

    Gets or sets the live reload timeout. It defines the time to apply prefab changes after modification.

    Declaration
    public TimeSpan LiveReloadTimeout { get; set; }
    Property Value
    System.TimeSpan

    LockSelectedObjects

    Indication of if the prefab window selection is locked on specific objects.

    Declaration
    public bool LockSelectedObjects { get; set; }
    Property Value
    System.Boolean

    Presenter

    Gets the prefab objects properties editor.

    Declaration
    public CustomEditorPresenter Presenter { get; }
    Property Value
    FlaxEditor.CustomEditors.CustomEditorPresenter

    PresenterViewport

    Gets the viewport linked with properties presenter (optional, null if unused).

    Declaration
    public EditorViewport PresenterViewport { get; }
    Property Value
    EditorViewport

    Implements
    IPresenterOwner.PresenterViewport

    Selection

    Gets the list of selected scene graph nodes in the editor context.

    Declaration
    public List<SceneGraphNode> Selection { get; }
    Property Value
    System.Collections.Generic.List<FlaxEditor.SceneGraph.SceneGraphNode>

    Implements
    ISceneEditingContext.Selection

    Tree

    Gets the prefab hierarchy tree control.

    Declaration
    public PrefabWindow.PrefabTree Tree { get; }
    Property Value
    PrefabWindow.PrefabTree

    Undo

    Gets the undo system used by this window for changes tracking.

    Declaration
    public Undo Undo { get; }
    Property Value
    Undo

    UseLayoutData

    Gets a value indicating whether window uses custom layout data.

    Declaration
    public override bool UseLayoutData { get; }
    Property Value
    System.Boolean

    Overrides
    DockWindow.UseLayoutData

    Viewport

    Gets the viewport.

    Declaration
    public PrefabWindowViewport Viewport { get; }
    Property Value
    PrefabWindowViewport

    Methods

    Copy()

    Copies selected objects to system clipboard.

    Declaration
    public void Copy()

    Cut()

    Cuts selected objects.

    Declaration
    public void Cut()

    Delete()

    Deletes selected objects.

    Declaration
    public void Delete()

    Deselect()

    Clears the selection.

    Declaration
    public void Deselect()

    Deselect(SceneGraphNode)

    Deselects the specified node.

    Declaration
    public void Deselect(SceneGraphNode node)
    Parameters
    FlaxEditor.SceneGraph.SceneGraphNode node

    Implements
    ISceneEditingContext.Deselect(SceneGraphNode)

    Duplicate()

    Duplicates selected objects.

    Declaration
    public void Duplicate()

    FocusSelection()

    Focuses selected objects.

    Declaration
    public void FocusSelection()
    Implements
    ISceneEditingContext.FocusSelection()

    OnAssetLoaded()

    Called when asset gets loaded and window can setup UI for it.

    Declaration
    protected override void OnAssetLoaded()
    Overrides
    FlaxEditor.Windows.Assets.AssetEditorWindowBase<FlaxEngine.Prefab>.OnAssetLoaded()

    OnDestroy()

    Method called when managed instance should be destroyed

    Declaration
    public override void OnDestroy()
    Overrides
    AssetEditorWindow.OnDestroy()

    OnEditedState()

    Action fired when object gets edited.

    Declaration
    protected override void OnEditedState()
    Overrides
    AssetEditorWindow.OnEditedState()

    OnLayoutDeserialize()

    Called when during windows layout deserialization if window has no layout data to load. Can be used to restore default UI layout.

    Declaration
    public override void OnLayoutDeserialize()
    Overrides
    DockWindow.OnLayoutDeserialize()

    OnLayoutDeserialize(XmlElement)

    Called when during windows layout deserialization. Each window can use it to load custom interface data (eg. splitter position).

    Declaration
    public override void OnLayoutDeserialize(XmlElement node)
    Parameters
    System.Xml.XmlElement node

    The Xml document node.

    Overrides
    DockWindow.OnLayoutDeserialize(XmlElement)

    OnLayoutSerialize(XmlWriter)

    Called when during windows layout serialization. Each window can use it to store custom interface data (eg. splitter position).

    Declaration
    public override void OnLayoutSerialize(XmlWriter writer)
    Parameters
    System.Xml.XmlWriter writer

    The Xml writer.

    Overrides
    DockWindow.OnLayoutSerialize(XmlWriter)

    OnMouseUp(Float2, MouseButton)

    When mouse goes up over control's area

    Declaration
    public override bool OnMouseUp(Float2 location, MouseButton button)
    Parameters
    Float2 location

    Mouse location in Control Space

    MouseButton button

    Mouse buttons state (flags)

    Returns
    System.Boolean

    True if event has been handled, otherwise false

    Overrides
    ContainerControl.OnMouseUp(Float2, MouseButton)

    OnScriptsReloadBegin()

    Declaration
    protected override void OnScriptsReloadBegin()
    Overrides
    AssetEditorWindow.OnScriptsReloadBegin()

    OnSelectionChanged(SceneGraphNode[])

    Called when selection gets changed.

    Declaration
    public void OnSelectionChanged(SceneGraphNode[] before)
    Parameters
    FlaxEditor.SceneGraph.SceneGraphNode[] before

    The selection before the change.

    Paste()

    Pastes objects from the system clipboard.

    Declaration
    public void Paste()

    Paste(Actor)

    Pastes the copied objects. Supports undo/redo.

    Declaration
    public void Paste(Actor pasteTargetActor)
    Parameters
    Actor pasteTargetActor

    The target actor to paste copied data.

    RenameSelection()

    Opends popup for renaming selected objects.

    Declaration
    public void RenameSelection()
    Implements
    ISceneEditingContext.RenameSelection()

    Save()

    Tries to save asset changes if it has been edited.

    Declaration
    public override void Save()
    Overrides
    AssetEditorWindow.Save()

    ScrollingOnTreeView(Boolean)

    Enables or disables vertical and horizontal scrolling on the tree panel.

    Declaration
    public void ScrollingOnTreeView(bool enabled)
    Parameters
    System.Boolean enabled

    The state to set scrolling to

    ScrollToSelectedNode()

    Scrolls to the selected node in the tree.

    Declaration
    public void ScrollToSelectedNode()

    Select(SceneGraphNode, Boolean)

    Selects the specified node.

    Declaration
    public void Select(SceneGraphNode node, bool additive = false)
    Parameters
    FlaxEditor.SceneGraph.SceneGraphNode node

    The node.

    System.Boolean additive

    if set to true will use additive mode, otherwise will clear previous selection.

    Implements
    ISceneEditingContext.Select(SceneGraphNode, Boolean)

    Select(List<SceneGraphNode>)

    Selects the specified nodes collection.

    Declaration
    public void Select(List<SceneGraphNode> nodes)
    Parameters
    System.Collections.Generic.List<FlaxEditor.SceneGraph.SceneGraphNode> nodes

    The nodes.

    Implements
    IPresenterOwner.Select(List<SceneGraphNode>)

    Spawn(Actor)

    Spawns the specified actor to the prefab (adds actor to root).

    Declaration
    public void Spawn(Actor actor)
    Parameters
    Actor actor

    The actor.

    Spawn(Actor, Actor, Int32)

    Spawns the specified actor.

    Declaration
    public void Spawn(Actor actor, Actor parent, int orderInParent = -1)
    Parameters
    Actor actor

    The actor.

    Actor parent

    The parent.

    System.Int32 orderInParent

    The order of the actor under the parent.

    Spawn(Type)

    Spawns the actor of the specified type to the prefab (adds actor to root).

    Declaration
    public void Spawn(Type type)
    Parameters
    System.Type type

    The actor type.

    UnlinkItem()

    Unlinks the item. Removes reference to it and unbinds all events.

    Declaration
    protected override void UnlinkItem()
    Overrides
    FlaxEditor.Windows.Assets.AssetEditorWindowBase<FlaxEngine.Prefab>.UnlinkItem()

    Update(Single)

    Perform control update and all its children

    Declaration
    public override void Update(float deltaTime)
    Parameters
    System.Single deltaTime

    Delta time in seconds

    Overrides
    FlaxEditor.Windows.Assets.AssetEditorWindowBase<FlaxEngine.Prefab>.Update(System.Single)

    UpdateToolstrip()

    Updates the toolstrip buttons and other controls. Called after some window events.

    Declaration
    protected override void UpdateToolstrip()
    Overrides
    AssetEditorWindow.UpdateToolstrip()

    Events

    ContextMenuShow

    Occurs when prefab hierarchy panel wants to show the context menu. Allows to add custom options. Applies to all prefab windows.

    Declaration
    public static event Action<ContextMenu> ContextMenuShow
    Event Type
    System.Action<FlaxEditor.GUI.ContextMenu.ContextMenu>

    SelectionChanged

    Occurs when selection gets changed.

    Declaration
    public event Action SelectionChanged
    Event Type
    System.Action

    Explicit Interface Implementations

    ISceneEditingContext.Viewport

    Gets the main or last editor viewport used for scene editing within this context.

    Declaration
    EditorViewport ISceneEditingContext.Viewport { get; }
    Returns
    EditorViewport

    Implements
    ISceneEditingContext.Viewport

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.RawClone<T>(T)

    See Also

    Prefab
    AssetEditorWindow
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat