Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion godot-macros/src/class/derive_godot_class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ fn make_onready_init(all_fields: &[Field]) -> TokenStream {

fn make_oneditor_panic_inits(class_name: &Ident, all_fields: &[Field]) -> TokenStream {
// Despite its name OnEditor shouldn't panic in the editor for tool classes.
let is_in_editor = quote! { ::godot::classes::Engine::singleton().is_editor_hint() };
let is_in_editor = quote! { <::godot::classes::Engine as ::godot::obj::Singleton>::singleton().is_editor_hint() };

let are_all_oneditor_fields_valid = quote! { are_all_oneditor_fields_valid };

Expand Down
5 changes: 4 additions & 1 deletion godot-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,15 @@ use crate::util::{bail, ident, KvParser};
/// [`Export`](../register/property/trait.Export.html):
///
/// ```
/// # use godot::prelude::*;
/// # use godot::prelude::{GodotClass, Node3D, Gd, OnEditor};
/// #[derive(GodotClass)]
/// # #[class(init)]
/// struct MyStruct {
/// #[export]
/// my_field: i64,
///
/// #[export]
/// child: OnEditor<Gd<Node3D>>,
/// }
/// ```
///
Expand Down
2 changes: 1 addition & 1 deletion itest/rust/src/object_tests/oneditor_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

use godot::classes::notify::NodeNotification;
use godot::classes::{INode, Node, RefCounted};
use godot::obj::{Gd, NewAlloc, OnEditor, Singleton};
use godot::obj::{Gd, NewAlloc, OnEditor};
use godot::register::{godot_api, GodotClass};

use crate::framework::{expect_panic, itest};
Expand Down
2 changes: 1 addition & 1 deletion itest/rust/src/object_tests/property_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use godot::builtin::{
use godot::classes::{INode, IRefCounted, Node, Object, RefCounted, Resource, Texture};
use godot::global::{PropertyHint, PropertyUsageFlags};
use godot::meta::{GodotConvert, PropertyHintInfo, ToGodot};
use godot::obj::{Base, EngineBitfield, EngineEnum, Gd, NewAlloc, NewGd, OnEditor, Singleton};
use godot::obj::{Base, EngineBitfield, EngineEnum, Gd, NewAlloc, NewGd, OnEditor};
use godot::register::property::{Export, Var};
use godot::register::{godot_api, Export, GodotClass, GodotConvert, Var};
use godot::test::itest;
Expand Down
Loading