EditorFeatureProfile

package
v0.0.0-...-fa94a0d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

An editor feature profile can be used to disable specific features of the Godot editor. When disabled, the features won't appear in the editor, which makes the editor less cluttered. This is useful in education settings to reduce confusion or when working in a team. For example, artists and level designers could use a feature profile that disables the script editor to avoid accidentally making changes to files they aren't supposed to edit.

To manage editor feature profiles visually, use Editor > Manage Feature Profiles... at the top of the editor window.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsEditorFeatureProfile() Instance
}

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsEditorFeatureProfile

func (self *Extension[T]) AsEditorFeatureProfile() Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

type Feature

type Feature int //gd:EditorFeatureProfile.Feature
const (
	// The 3D editor. If this feature is disabled, the 3D editor won't display but 3D nodes will still display in the Create New Node dialog.
	Feature3d Feature = 0
	// The Script tab, which contains the script editor and class reference browser. If this feature is disabled, the Script tab won't display.
	FeatureScript Feature = 1
	// The AssetLib tab. If this feature is disabled, the AssetLib tab won't display.
	FeatureAssetLib Feature = 2
	// Scene tree editing. If this feature is disabled, the Scene tree dock will still be visible but will be read-only.
	FeatureSceneTree Feature = 3
	// The Node dock. If this feature is disabled, signals and groups won't be visible and modifiable from the editor.
	FeatureNodeDock Feature = 4
	// The FileSystem dock. If this feature is disabled, the FileSystem dock won't be visible.
	FeatureFilesystemDock Feature = 5
	// The Import dock. If this feature is disabled, the Import dock won't be visible.
	FeatureImportDock Feature = 6
	// The History dock. If this feature is disabled, the History dock won't be visible.
	FeatureHistoryDock Feature = 7
	// The Game tab, which allows embedding the game window and selecting nodes by clicking inside of it. If this feature is disabled, the Game tab won't display.
	FeatureGame Feature = 8
	// Represents the size of the [Feature] enum.
	FeatureMax Feature = 9
)

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.EditorFeatureProfile

Instance of the class with convieniently typed arguments and results.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AsEditorFeatureProfile

func (self Instance) AsEditorFeatureProfile() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) GetFeatureName

func (self Instance) GetFeatureName(feature Feature) string

Returns the specified 'feature”s human-readable name.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) IsClassDisabled

func (self Instance) IsClassDisabled(class_name string) bool

Returns true if the class specified by 'class_name' is disabled. When disabled, the class won't appear in the Create New Node dialog.

func (Instance) IsClassEditorDisabled

func (self Instance) IsClassEditorDisabled(class_name string) bool

Returns true if editing for the class specified by 'class_name' is disabled. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class.

func (Instance) IsClassPropertyDisabled

func (self Instance) IsClassPropertyDisabled(class_name string, property string) bool

Returns true if 'property' is disabled in the class specified by 'class_name'. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by 'class_name'.

func (Instance) IsFeatureDisabled

func (self Instance) IsFeatureDisabled(feature Feature) bool

Returns true if the 'feature' is disabled. When a feature is disabled, it will disappear from the editor entirely.

func (Instance) LoadFromFile

func (self Instance) LoadFromFile(path string) error

Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's Export button or the SaveToFile method.

Note: Feature profiles created via the user interface are loaded from the feature_profiles directory, as a file with the .profile extension. The editor configuration folder can be found by using EditorPaths.GetConfigDir.

func (Instance) SaveToFile

func (self Instance) SaveToFile(path string) error

Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's Import button or the LoadFromFile method.

Note: Feature profiles created via the user interface are saved in the feature_profiles directory, as a file with the .profile extension. The editor configuration folder can be found by using EditorPaths.GetConfigDir.

func (Instance) SetDisableClass

func (self Instance) SetDisableClass(class_name string, disable bool)

If 'disable' is true, disables the class specified by 'class_name'. When disabled, the class won't appear in the Create New Node dialog.

func (Instance) SetDisableClassEditor

func (self Instance) SetDisableClassEditor(class_name string, disable bool)

If 'disable' is true, disables editing for the class specified by 'class_name'. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class.

func (Instance) SetDisableClassProperty

func (self Instance) SetDisableClassProperty(class_name string, property string, disable bool)

If 'disable' is true, disables editing for 'property' in the class specified by 'class_name'. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by 'class_name'.

func (Instance) SetDisableFeature

func (self Instance) SetDisableFeature(feature Feature, disable bool)

If 'disable' is true, disables the editor feature specified in 'feature'. When a feature is disabled, it will disappear from the editor entirely.

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL