-
Notifications
You must be signed in to change notification settings - Fork 211
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Context
I have a struct "BasicPlayer" which has a property "speed" that is accessible through the Godot Editor:
#[derive(NativeClass)]
#[inherit(Spatial)]
pub struct BasicPlayer {
#[property(path = "BasicPlayer/speed", default = 0.15)]
pub speed: f32,
pub keys: HashMap<u64, ()>,
pub cam: Option<TRef<'static, Camera>>,
}And I have another struct "FPSPlayer" which has a property "player", which I would want to be able to access through the Godot Editor:
#[derive(NativeClass)]
#[inherit(Spatial)]
pub struct FPSPlayer {
pub player: BasicPlayer,
}Problem
In a node that has the "FPSPlayer" class assigned as a script, I need to access the properties under the "player" property through the Godot Editor, preferably without having to manually make a setter for it.
Example of what I would want to do (which obviously doesn't actually work)
#[derive(NativeClass)]
#[inherit(Spatial)]
pub struct FPSPlayer {
#[property] // This line was added
pub player: BasicPlayer,
}And I should be able to access its properties through the Godot Editor:

