godotengine / godotengine/godot-docs
Confusing documentation on `PropertyUsageFlags`
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
**Your Godot version:**
v4.1.2.stable.official [399c9dc39]
**Issue description:**
I'm working with the Rust GDExtension bindings and trying to figure out what the default `PropertyUsageFlags` values should be for properties.
The description for `PROPERTY_USAGE_SCRIPT_VARIABLE` says:
> The property is a script variable which should be serialized and saved in the scene file.
And that flag is set on all `var`s in gdscript by default, you can check via `get_property_list()`, but only fields that also have `PROPERTY_USAGE_STORAGE` seem to be actually stored.
Also in the GDScript docs it seems to say that only `@export`'d properties are serialized:
[Intro to exports](https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_exports.html#introduction-to-exports)
> In Godot, class members can be exported. This means their value gets saved along with the resource (such as the [scene](https://docs.godotengine.org/en/stable/classes/class_packedscene.html#class-packedscene)) they're attached to. They will also be available for editing in the property editor. Exporting is done by using the @export annotation.
[Reference for the @export annotaiton](https://docs.godotengine.org/en/stable/classes/class_%40gdscript.html#annotations)
> @export ( )
>
> Mark the following property as exported (editable in the Inspector dock and saved to disk). ...
Should the behavior in Godot match the docs, or should the docs be updated?
See also https://github.com/godot-rust/gdext/issues/463
**URL to the documentation page:**
https://docs.godotengine.org/en/stable/classes/class_%40globalscope.html#enum-globalscope-propertyusageflags
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.