Instance Methodmigueldeicaza.swiftgodot 0.45.0SwiftGodot
isSelfContained
Returns true
if the editor is marked as self-contained, false
otherwise. When self-contained mode is enabled, user configuration, data and cache files are saved in an editor_data/
folder next to the editor binary. This makes portable usage easier and ensures the Godot editor minimizes file writes outside its own folder. Self-contained mode is not available for exported projects.
final func isSelfContained() -> Bool
Self-contained mode can be enabled by creating a file named ._sc_
or _sc_
in the same folder as the editor binary or macOS .app bundle while the editor is not running. See also getSelfContainedFile
.
Other members in extension
Type members
Instance members
func getCacheDir(
) -> String Returns the absolute path to the user’s cache folder. This folder should be used for temporary data that can be removed safely whenever the editor is closed (such as generated resource thumbnails).
func getConfigDir(
) -> String Returns the absolute path to the user’s configuration folder. This folder should be used for persistent user configuration files.
func getDataDir(
) -> String Returns the absolute path to the user’s data folder. This folder should be used for persistent user data files such as installed export templates.
func getProjectSettingsDir(
) -> String Returns the project-specific editor settings path. Projects all have a unique subdirectory inside the settings path where project-specific editor settings are saved.
func getSelfContainedFile(
) -> String Returns the absolute path to the self-contained file that makes the current Godot editor instance be considered as self-contained. Returns an empty string if the current Godot editor instance isn’t self-contained. See also
isSelfContained
.