gdext: Can't preload resources
In GDscript preload() loads resource when script is parsed.
But in Godot Rust there’s no way to preload a resource. I suggest adding a preload attribute to GodotClass derive macro:
#[derive(GodotClass)]
#[class(base=Node)]
pub struct Example {
#[preload("/path")]
texture: Gd<ImageTexture>,
#[base]
base: Base<Node>,
}
So during the class registration, the resource is loaded (maybe using Godot’s ResourcePreloader class).
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 19 (11 by maintainers)
It all sounds wise.
I think platform support there tries to climb up in the list of priorities, specially regarding the ever growing mobile market. Current state of everything else may be considered ready enough for some projects, but when export time arrives, the platform support can scare some away! Of course there is always the issue of man power, time and resources.
Anyway! You and GDExt contributors have done a great job. I really appreciate it and wish you all health and happiness.