Introduction

Screenshot

This documentation covers most important parts of Runtime Editor. Unlike previous versions of the documentation, I tried to concentrate more on examples rather then documenting each property of each script. Let me know what examples you would like to see.

Start with following sections:

List of Features

  • Position Handle, Rotation Handle, Scale Handle, Rect Tool.
  • Grid, Box Selection, Scene Gizmo.
  • Global & Local coordinates, Local & Center pivot point modes, Vertex & Grid snapping.
  • Gizmos for Colliders, Lights and Audio Sources.
  • Scene navigation, Orthographic & Perspective mode.
  • Undo & Redo API.
  • Object selection API.
  • Object life-cycle Events.
  • Play & Edit mode.
  • Configurable Inspector.
  • Component & Material editors.
  • 20+ Built-in property editors.
  • Ability to edit components of multiple selected objects.
  • Add Component control.
  • Multiple scenes and cameras support.
  • Dock Panels & Windows Management.
  • Dialogs, Message Boxes, Confirmations.
  • Easy to extend with new windows.
  • Configurable Main & Context menu.
  • Lightweight Virtualizing Tree View for Hierarchy and Project windows.
  • Configurable Save & Load subsystem (almost no coding is required).
  • Easy to use Project API.
  • Static Assets, Asset Bundles and Runtime Assets support.
  • Load assets on demand.
  • Multiple Projects support.
  • Animation Editor.
  • Terrain Editor.
  • ProBuilder Integration.
  • Runtime Scripting.
  • Universal Render Pipeline support.
  • HD Renderer Pipeline support (Beta).

Runtime Editor 2.11 to 2.26 update procedure

Following upgrade procedure covers breaking changes introduced with Runtime Editor v2.26 and it attempts to minimize effort to deal with it.

  1. Remove all subfolders from Battlehub folder except RTEditor_Data and RTSL_Data.
  2. Remove RTSL_Data/Scripts folder.
  3. Remove RTSL_Data/CustomImplementation folder.
    • In case you have your own custom implementations, copy them to another place outside the Assets folder of the project. Screenshot  
  4. Import Runtime Editor 2.26. Make sure you have no compiler errors in console. Please refer to API Changes section section for details.
  5. Open Tools->Runtime SaveLoad->Persistent Classes->Edit and click Update Mappings button Screenshot  
  6. Click Create Persistent Classes button Screenshot  
  7. If you have a backup with your own custom implementations, copy them back to the RTSL_Data/CustomImplementation folder. Make sure that there are no compiler errors in the console. Please refer to API Changes section section for details.
  8. Click Build All button. Screenshot  
  9. Update Editors Map
  10. Update completed

Note

if you have any exceptions after the runtime editor launch, try Reimport All command from Unity Editor context menu in the project window.

Editors Map 2.11 to 2.26 update procedure

  1. Open Tools->Runtime Editor->Configuration Screenshot  
  2. Set the LayersInfo field to LayersEditor, RangeFlags field to FlagsIntEditor, LayerMask field to LayerMaskEditor. Screenshot  
  3. Click Save Editors Map. Screenshot

RuntimeEditor.prefab 2.11 to 2.26 update procedure

  1. Add GraphicsComponent game object under RuntimeEditor\Components. Add RTEGraphics component. Screenshot  
  2. Add RTEUIRaycaster component to RuntimeEditor\UI game object. Screenshot  
  3. Add EditorsMap component to RuntimeEditor game object. Screenshot  
  4. Set Tab field of DockPanel component of RTEditor\UI\LayoutRoot\Middle\DockPanel game object. Screenshot  
  5. Remove missing script from RTEditor\Components\HandlesComponent. Screenshot  
  6. Change RuntimeEditor\UICamera culling mask to UIBackground (Layer 16) | UIForeground (Layer 15)
  7. Change RuntimeEditor\UI layer to UIForegroundd (Layer 15) (Select "Yes, change children" when promted)

API Breaking Changes

LayoutInfo public constructor is deprecated (Instead, you should use the IWindowManager.CreateLayoutInfo method):

//Deprecated
LayoutInfo layoutInfo = new LayoutInfo(sceneContent.transform, sceneWd.Header, sceneWd.Icon);

//New
IWindowManager wm = IOC.Resolve<IWindowManager>();
LayoutInfo layoutInfo = wm.CreateLayoutInfo(sceneContent.transform, sceneWd.Header, sceneWd.Icon);

Automatically generated EditorMap partial class from Assets/Battlehub/RTEditor_Data/Scripts/Editors/EditorsMapAuto.cs should be renamed EditorsMapCreator and changed as follows:

//Deprecated
using System; 
using System.Collections.Generic; 
namespace Battlehub.RTEditor
{
    public partial class EditorsMap
    {
        partial void InitEditorsMap()
        {
            m_map = new Dictionary<Type, EditorDescriptor>
            {
                { typeof(UnityEngine.GameObject), new EditorDescriptor(0, true, false) },

                //...
            }
        }
    }
}

//New
using System;
using System.Collections.Generic;
using Battlehub.RTCommon;
namespace Battlehub.RTEditor
{
    public partial class EditorsMapCreator : IEditorsMapCreator
    {
        #if UNITY_EDITOR
        [UnityEditor.InitializeOnLoadMethod]
        #endif
        [UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.SubsystemRegistration)]
        static void Register()
        {
            IOC.RegisterFallback<IEditorsMapCreator>(() => new EditorsMapCreator());
        }

        void IEditorsMapCreator.Create(IEditorsMap map)
        {
            foreach (KeyValuePair<Type, EditorDescriptor> kvp in InitEditorsMap())
            {
                Type type = kvp.Key;
                EditorDescriptor desc = kvp.Value;

                map.AddMapping(type, desc.Index, desc.Enabled, desc.IsPropertyEditor);
            }
        }

        private class EditorDescriptor
        {
            public int Index;
            public bool Enabled;
            public bool IsPropertyEditor;

            public EditorDescriptor(int index, bool enabled, bool isPropertyEditor)
            {
                Index = index;
                Enabled = enabled;
                IsPropertyEditor = isPropertyEditor;
            }
        }

        private Dictionary<Type, EditorDescriptor> InitEditorsMap()
        {
            return new Dictionary<Type, EditorDescriptor>
            {
                { typeof(UnityEngine.GameObject), new EditorDescriptor(0, true, false) },

                //....
            }
        }
    }
}

Custom implementation of persistent class must be modified as follows:


//Deprecated
using Battlehub.RTSL;
using ProtoBuf;
namespace MyNamespace.Battlehub.SL2
{
    [CustomImplementation]
    public partial class MyPersistentClass
    {        
        [ProtoMember(1)]
        public long[] Data;

        //.....

        public override void GetDeps(GetDepsContext context)
        {
            base.GetDeps(context);
        }

        //.....
    }
}

//New
using Battlehub.RTSL;
using ProtoBuf;
namespace Battlehub.RTEditor.Battlehub.SL2
{
    [CustomImplementation]
    public partial class MyPersistentClass<TID>
    {        

        [ProtoMember(1)]
        public TID[] Fields;

        //.....

        public override void GetDeps(GetDepsContext<TID> context)
        {
            base.GetDeps(context);
        }

        //.....
    }
}

Note

Let me know if any example missing or you have problems updating the API.

Changelog

RTE 2.25 - Sept 30, 2020

  • Project structure: reorganized to support unity package manager

  • Inspector: ability to select and edit multiple game objects and components.

  • Inspector: layers editor.
  • Inspector: layer mask editor.
  • Inspector: culling mask added to camera component editor.
  • Inspector: add component button keyboard navigation.
  • Inspector: ability to configure visibility of buttons.
  • Inspector: support for components with RequireComponent attribute.

  • Hierarchy: search field added.

  • Hierarchy: ability to override HierarchyView.
  • Project: search field added.
  • Project: ability to duplicate folders.
  • Project: ability to override ProjectFolderView.
  • Project: ability to override ProjectTreeView.
  • Scene: ability to focus all active in hierarchy game objects with renderers.
  • Scene: select objects on mouse button up.
  • Scene: ability to select objects without collider.
  • Scene: new box selection mode - pixel perfect depth test.
  • Scene: auto save layout.
  • DockPanel: Region.ClassAllTabs method added.
  • DockPanel: variable tab size support.
  • DockPanel: LayoutInfo must be created using IWindowManager.CreateLayoutInfo method.
  • Theming: ability to set and update theme at runtime.
  • Settings: dialog added.

  • ProBuilder: uv unwrapping window.

  • ProBuilder: uv stitch tool.
  • ProBuilder: smooth groups editor.

  • Graphics: HD Render Pipeline Support (Beta).

  • Graphics: Universal Render Pipeline Support.
  • Graphics: GL is not used anymore and replaced with CommandBuffer.

  • RTSL: k__BackingField and delegates are not visible in Persistent Classes Window anymore.

  • RTSL: separate RuntimeTypeModel.dll for each build target.
  • RTSL: generating link.xml to support IL2CPP scripting backend.
  • RTSL: mesh, texture, audio data imported from asset bundle is not saved on disk anymore.
  • RTSL: save & load time and memory consumption reduced.
  • RTSL: preventing the Editor from crashing when entering play mode with selected asset library.
  • RTSL: support for different types of identifiers.
  • RTSL: Autogenerated TypeMap.cs replace with TypeMapCreator
  • RTSL: [CustomImplementation] class structure changed
  • RTSL: IProject.ToID replaced with IProject.ToPersistentID method.
  • RTSL: IProject.FromID replaced with IProject.FromPersistentID method.
  • RTSL: IStorage interface replaced with IStrorage<> with PersistentObject<> params

RTE 2.11 - Jan 30, 2020

  • Terrain details & trees editor

RTE 2.10 - Dec 30, 2019

  • Terrain editor.
  • ProBuilder integration.
  • Animation editor.
  • Runtime scripting.
  • Localization.
  • Transform Handles: Rect Tool.

RTE 2.05 - April 30, 2019

  • Ability to change RTE UI Colors.
  • UI.Text replaced with TextMeshProUGUI;
  • File importers -> obj, png, jpg;
  • VTV.SelectedIndex is set to -1 when Selected Item is null;
  • Creating Primitives with Default-Material;
  • ProjectItem.Get method fixed;
  • Loading last project by default;
  • Create project folder if there was no project before.
  • Create camera and directional light by default.
  • Dynamic resouces cleanup procedure fixed;
  • Project Folder Drag & Drop bug fixed.

RTE 2.04 - March 30, 2019

  • Rendering scene view and game view using RenderTexture and RawImage;
  • LWRP support;
  • Transform Handles: position handle freeze bug fixed.
  • Transform Handles: correct model scale.
  • Duplicate scene bug fixed.
  • "Open" context menu item added.
  • RuntimeWindow CanActivate property added.
  • Ability to create tab groups.
  • IOC container unloading bug fixed.

RTE 2.03 - February 13, 2019

  • Configurable layout.
  • Configurable tools panel.
  • Configurable ui scale.
  • Editor mappings are stored in RTEditor_Data folder and will not be overriden anymore.
  • RTSL: TypeModel.dll correct import settings.
  • RTSL: close progress bar in case of exception.
  • Trasnform Handles: nullref exception fixed.

RTE 2.02 - January 30, 2019

  • RTSL: codegen & persistent class storage fixed.
  • RTSL: camera.pixelRect saved by default.
  • RTSL: demo scene update.
  • Transform Handles: demo scene update.

RTE 2.01 - January 13, 2019

  • Set default layout nullref exception fixed.
  • Transform Handles: prefabs added;
  • Transform Handles: demo scene;

RTE 2.00 - Dec 30, 2018

  • Runtime save-load subsystem.
  • Ability create/manage projects.
  • Project API.
  • Assets & Asset bundles importer.
  • Configurable layout (dock panels).
  • Configurable main & context menu.
  • New dialog windows and message boxes.
  • Multiple viewports supported.
  • Runtime handles touch support.
  • Simple depency injection (IOC).
  • Undo & Redo API.
  • Object selection API.
  • Object life-cycle events.
  • Add components control.
  • Console window.
  • Lists and Hierarchies virtualization.

About

Hi, I am Vadym. I put a lot of effort into creating the Runtime Editor, but it was an interesting and rewarding experience. The first version of Runtime editor was released in June 2016 and was pretty simplistic. The current version is much more sophisticated but at the same time much more flexible and contains many useful features. If you have any questions or suggestions send them by email to [email protected] or join this support group. I hope you enjoy using the Runtime Editor and it will be useful.