Runtime Studio Object Settings
Add Fullscreen > Runtime Studio > Object Settings to a GameObject that needs special editor rules.
The component has three options:
Hide From Runtime Editorremoves the GameObject and its children from the Runtime Studio Hierarchy and scene selection.Prevent Deletionkeeps the GameObject in the editor, but it cannot be deleted.Lock Editingkeeps the GameObject visible and selectable, but disables its Inspector and transform editing. The Inspector is shown in a greyed-out state.
These values can also be changed from a script:
csharp
using Fullscreen.RuntimeStudio.Runtime;
using UnityEngine;
public sealed class RuntimeStudioRulesExample : MonoBehaviour
{
[SerializeField] private RuntimeStudioObjectSettings rules;
public void Protect()
{
rules.HideFromRuntimeEditor = false;
rules.PreventDeletion = true;
rules.LockEditing = true;
}
}The same component can be changed at runtime with SetHidden, SetDeletionProtected, and SetEditingLocked. A hidden parent also hides its children from Runtime Studio.