EditorFeatureProfile
An editor feature profile which can be used to disable specific features.
EditorFeatureProfile.swift:20class EditorFeatureProfile
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.
Superclasses
class RefCounted
Base class for reference-counted objects.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Types
Type members
Instance members
func getFeatureName(feature: EditorFeatureProfile.Feature
) -> String Returns the specified
feature
’s human-readable name.func isClassDisabled(className: StringName
) -> Bool Returns
true
if the class specified byclassName
is disabled. When disabled, the class won’t appear in the Create New Node dialog.func isClassEditorDisabled(className: StringName
) -> Bool Returns
true
if editing for the class specified byclassName
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 isClassPropertyDisabled(className: StringName, property: StringName
) -> Bool Returns
true
ifproperty
is disabled in the class specified byclassName
. When a property is disabled, it won’t appear in the Inspector when selecting a node that extends the class specified byclassName
.func isFeatureDisabled(feature: EditorFeatureProfile.Feature
) -> Bool Returns
true
if thefeature
is disabled. When a feature is disabled, it will disappear from the editor entirely.func loadFromFile(path: String
) -> GodotError 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(path:)
method.func saveToFile(path: String
) -> GodotError 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(path:)
method.func setDisableClass(className: StringName, disable: Bool
) If
disable
istrue
, disables the class specified byclassName
. When disabled, the class won’t appear in the Create New Node dialog.func setDisableClassEditor(className: StringName, disable: Bool
) If
disable
istrue
, disables editing for the class specified byclassName
. 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 setDisableClassProperty(className: StringName, property: StringName, disable: Bool
) If
disable
istrue
, disables editing forproperty
in the class specified byclassName
. When a property is disabled, it won’t appear in the Inspector when selecting a node that extends the class specified byclassName
.func setDisableFeature(EditorFeatureProfile.Feature, disable: Bool
) If
disable
istrue
, disables the editor feature specified infeature
. When a feature is disabled, it will disappear from the editor entirely.