Class EditorFeatureProfile
- Namespace
- Godot
- Assembly
- GodotSharpEditor.dll
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.
public class EditorFeatureProfile : RefCounted, IDisposable
- Inheritance
-
EditorFeatureProfile
- Implements
- Inherited Members
Constructors
EditorFeatureProfile()
public EditorFeatureProfile()
Methods
GetFeatureName(Feature)
Returns the specified feature
's human-readable name.
public string GetFeatureName(EditorFeatureProfile.Feature feature)
Parameters
feature
EditorFeatureProfile.Feature
Returns
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
IsClassDisabled(StringName)
Returns true
if the class specified by className
is disabled. When disabled, the class won't appear in the Create New Node dialog.
public bool IsClassDisabled(StringName className)
Parameters
className
StringName
Returns
IsClassEditorDisabled(StringName)
Returns true
if editing for the class specified by className
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.
public bool IsClassEditorDisabled(StringName className)
Parameters
className
StringName
Returns
IsClassPropertyDisabled(StringName, StringName)
Returns true
if property
is disabled in the class specified by className
. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by className
.
public bool IsClassPropertyDisabled(StringName className, StringName property)
Parameters
className
StringNameproperty
StringName
Returns
IsFeatureDisabled(Feature)
Returns true
if the feature
is disabled. When a feature is disabled, it will disappear from the editor entirely.
public bool IsFeatureDisabled(EditorFeatureProfile.Feature feature)
Parameters
feature
EditorFeatureProfile.Feature
Returns
LoadFromFile(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 SaveToFile(string) 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 GetConfigDir().
public Error LoadFromFile(string path)
Parameters
path
string
Returns
SaveToFile(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 LoadFromFile(string) 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 GetConfigDir().
public Error SaveToFile(string path)
Parameters
path
string
Returns
SetDisableClass(StringName, bool)
If disable
is true
, disables the class specified by className
. When disabled, the class won't appear in the Create New Node dialog.
public void SetDisableClass(StringName className, bool disable)
Parameters
className
StringNamedisable
bool
SetDisableClassEditor(StringName, bool)
If disable
is true
, disables editing for the class specified by className
. 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.
public void SetDisableClassEditor(StringName className, bool disable)
Parameters
className
StringNamedisable
bool
SetDisableClassProperty(StringName, StringName, bool)
If disable
is true
, disables editing for property
in the class specified by className
. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by className
.
public void SetDisableClassProperty(StringName className, StringName property, bool disable)
Parameters
className
StringNameproperty
StringNamedisable
bool
SetDisableFeature(Feature, bool)
If disable
is true
, disables the editor feature specified in feature
. When a feature is disabled, it will disappear from the editor entirely.
public void SetDisableFeature(EditorFeatureProfile.Feature feature, bool disable)
Parameters
feature
EditorFeatureProfile.Featuredisable
bool