EditorFeatureProfile

Hereda: RefCounted < Object

Un perfil de características del editor que puede ser usado para deshabilitar características específicas.

Descripción

Un perfil de características del editor puede ser usado para deshabilitar características específicas del editor de Godot. Cuando se deshabilita, las características no aparecen en el editor, lo que hace que el editor esté menos desordenado. Esto es útil en entornos educativos para reducir la confusión o cuando se trabaja en equipo. Por ejemplo, los artistas y los diseñadores de niveles podrían utilizar un perfil de características que deshabilite el editor de scripts para evitar hacer accidentalmente cambios en los archivos que no deben editar.

Para gestionar visualmente los perfiles de característica del editor, utiliza Editor > Manage Feature Profiles... en la parte superior de la ventana del editor.

Métodos

String

get_feature_name(feature: Feature)

bool

is_class_disabled(class_name: StringName) const

bool

is_class_editor_disabled(class_name: StringName) const

bool

is_class_property_disabled(class_name: StringName, property: StringName) const

bool

is_feature_disabled(feature: Feature) const

Error

load_from_file(path: String)

Error

save_to_file(path: String)

void

set_disable_class(class_name: StringName, disable: bool)

void

set_disable_class_editor(class_name: StringName, disable: bool)

void

set_disable_class_property(class_name: StringName, property: StringName, disable: bool)

void

set_disable_feature(feature: Feature, disable: bool)


Enumeraciones

enum Feature: 🔗

Feature FEATURE_3D = 0

El editor 3D. Si esta característica está desactivada, el editor 3D no se mostrará, pero los nodos 3D seguirán mostrándose en el diálogo Crear nuevo nodo.

Feature FEATURE_SCRIPT = 1

La pestaña Script, que contiene el editor de scripts y el navegador de referencia de clases. Si esta característica está desactivada, la pestaña Script no se mostrará.

Feature FEATURE_ASSET_LIB = 2

La pestaña Librería de Assets. Si esta característica está deshabilitada, la pestaña Librería de Assets no se mostrará.

Feature FEATURE_SCENE_TREE = 3

Edición del árbol de escenas. Si esta función está desactivada, el acoplamiento del árbol de escenas seguirá siendo visible pero será de sólo lectura.

Feature FEATURE_NODE_DOCK = 4

El nodo dock. Si esta característica está desactivada, las señales y grupos no serán visibles y modificables desde el editor.

Feature FEATURE_FILESYSTEM_DOCK = 5

El dock del Sistema de Archivo. Si esta función está desactivada, el acoplamiento del Sistema de archivos no será visible.

Feature FEATURE_IMPORT_DOCK = 6

El Import dock. Si esta función está desactivada, el muelle de importación no será visible.

Feature FEATURE_HISTORY_DOCK = 7

The History dock. If this feature is disabled, the History dock won't be visible.

Feature FEATURE_GAME = 8

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.

Feature FEATURE_MAX = 9

Representa el tamaño del enum Feature.


Descripciones de Métodos

String get_feature_name(feature: Feature) 🔗

Returns the specified feature's human-readable name.


bool is_class_disabled(class_name: StringName) const 🔗

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


bool is_class_editor_disabled(class_name: StringName) const 🔗

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.


bool is_class_property_disabled(class_name: StringName, property: StringName) const 🔗

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.


bool is_feature_disabled(feature: Feature) const 🔗

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


Error load_from_file(path: String) 🔗

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 save_to_file() 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.get_config_dir().


Error save_to_file(path: String) 🔗

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 load_from_file() 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.get_config_dir().


void set_disable_class(class_name: StringName, 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.


void set_disable_class_editor(class_name: StringName, 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.


void set_disable_class_property(class_name: StringName, property: StringName, 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.


void set_disable_feature(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.