Skip to content

Commit cdcdadc

Browse files
committed
Add OnEditor<T>, remove Export implementations for DynGd and Gd
- Make clear that OnEditor<T> works with `#[var]` properties and as a rust field set on struct as well
1 parent 49c27de commit cdcdadc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

godot-core/src/obj/oneditor.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use crate::registry::property::{BuiltinExport, Export, Var};
1515
///
1616
/// Panics during access if uninitialized.
1717
/// When used inside a node class, `OnEditor` checks if a value has been set before `ready()` is run, and panics otherwise.
18+
/// This validation is performed for all `OnEditor` fields declared in a given `GodotClass`, regardless of whether they are `#[var]`, `#[export]`, or neither.
1819
/// Once initialized, it can be used almost as if it was a `T` value itself, due to `Deref`/`DerefMut` impls.
1920
///
2021
/// `OnEditor<T>` should always be used as a property, preferably in tandem with an `#[export]` or `#[var]`.

0 commit comments

Comments
 (0)