using System; using System.Runtime.CompilerServices; using BansheeEngine; namespace BansheeEditor { /// /// GUI element that displays all scene objects in the current scene as a tree view. /// public sealed class GUISceneTreeView : GUIElement { /// /// Creates a new scene tree view element. /// /// Optional style to use for the element. Style controls the look of the element, as well as /// default layout options. Style will be retrieved from the active GUISkin. If not specified /// default element style is used. /// Options that allow you to control how is the element positioned and sized. This will /// override any similar options set by style. public GUISceneTreeView(string style = "", params GUIOption[] options) { Internal_CreateInstance(this, style, options); } /// /// Creates a new scene tree view element. /// /// Options that allow you to control how is the element positioned and sized. This will /// override any similar options set by style. public GUISceneTreeView(params GUIOption[] options) { Internal_CreateInstance(this, "", options); } /// /// Updates the contents of the tree view with most recent scene data. Should be called once per frame. /// public void Update() { Internal_Update(mCachedPtr); } /// /// Triggered by the runtime when the scene is modified from the native scene tree view. /// private void Internal_DoOnModified() { EditorApplication.SetSceneDirty(); } [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_CreateInstance(GUISceneTreeView instance, string style, GUIOption[] options); [MethodImpl(MethodImplOptions.InternalCall)] private static extern void Internal_Update(IntPtr thisPtr); } }