Comments (3)
PROPERTY_USAGE_DEFAULT
is used by default for exported properties, in _get_property_list()
, etc. But by default, script variables are not exported at all:
var a # SCRIPT_VARIABLE
@export_storage var b # STORAGE | SCRIPT_VARIABLE
@export var c: int # DEFAULT | SCRIPT_VARIABLE
We should probably clarify this in the documentation.
from godot.
You should export1 the property so that it is taken into account by the duplicate()
method and serialization.
This is documented here, but we need to copy the note into descriptions of similar methods, see #80585.
Footnotes
-
At least the
PROPERTY_USAGE_STORAGE
flag must be present, since 4.3 dev there is an annotation@export_storage
. ↩
from godot.
@dalexeev adding the @export_storage
annotation works as expected , Thank you .. however i just find the documentation confusing a little bit when it says :
Note: Not all properties are included. Only properties that are configured with the @GlobalScope.PROPERTY_USAGE_STORAGE flag set will be serialized.
Then when we take a look at where this link goes :
PropertyUsageFlags PROPERTY_USAGE_STORAGE = 2
The property is serialized and saved in the scene file (default).
The way i interpreted the (default) is that this flag is already set by default for the class' properties. isn't it the case or am i missing something .
from godot.
Related Issues (20)
- Modifying Pinned Points of `SoftBody3D` is broken HOT 3
- converting a CPUParticles3D to GPUParticles3D often crashes godot on Android (PowerVR gpu)
- Parser Error: Native class "EditorSpinSlider" cannot be constructed as it is abstract. HOT 3
- platform differences in rendering openXRCompositionLayers with Hole Punch feature
- Inconsistent behavior when undoing animation bezier movements upon selection of different animations HOT 1
- Signal 11 crash with no debug info in backtrace HOT 21
- Some weird behaviour involving CanvasLayer, Viewport and World2D HOT 3
- Round primitive meshes contain gaps. HOT 1
- Fullscreen mode's border color does not update when transparent background is disabled HOT 4
- FileSystem shows custom Resource icon of first external dependancy instead of correct icon HOT 1
- MultiMesh custom data bits are not accurate HOT 2
- Resource (re)importing speed is affected by editor framerate, leading to slow import speeds when the window is unfocused
- LineEdit sometimes does not display the last character
- ShapeCast3D detects colliders behind it HOT 5
- Log chinese error. HOT 3
- UV Map Node Ignored in GLTF/GLB Import HOT 2
- Main submenus are all black sometimes (XWayland windows, Nvidia) HOT 3
- PhysicsShapeQueryParameters3D's exclude array seems to be ignored in PhysicsDirectSpaceState3D intersect_shape func. HOT 7
- "Create New Node" dialog main scrolling area is not scrolled up to the top when summoning it HOT 1
- NoThreads Web export : AudioStreamPlayer's finished() signal doesn't emit when sound is done playing. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot.