@@ -6,7 +6,7 @@ pub enum ManageErrs {
66 RootClassNotSpatial ( String ) ,
77}
88
9- #[ derive( gdnative:: NativeClass ) ]
9+ #[ derive( gdnative:: derive :: NativeClass ) ]
1010#[ inherit( Spatial ) ]
1111struct SceneCreate {
1212 // Store the loaded scene for a very slight performance boost but mostly to show you how.
@@ -24,7 +24,7 @@ struct SceneCreate {
2424// Note, the same mechanism which is used to call from panel into spawn_one and remove_one can be
2525// used to call other GDNative classes here in rust.
2626
27- #[ gdnative:: methods]
27+ #[ gdnative:: derive :: methods]
2828impl SceneCreate {
2929 fn new ( _owner : & Spatial ) -> Self {
3030 SceneCreate {
@@ -33,7 +33,7 @@ impl SceneCreate {
3333 }
3434 }
3535
36- #[ export]
36+ #[ gdnative :: derive :: export]
3737 fn _ready ( & mut self , _owner : & Spatial ) {
3838 self . template = load_scene ( "res://Child_scene.tscn" ) ;
3939 match & self . template {
@@ -42,7 +42,7 @@ impl SceneCreate {
4242 }
4343 }
4444
45- #[ export]
45+ #[ gdnative :: derive :: export]
4646 fn spawn_one ( & mut self , owner : & Spatial , message : GodotString ) {
4747 godot_print ! ( "Called spawn_one({})" , message. to_string( ) ) ;
4848
@@ -77,7 +77,7 @@ impl SceneCreate {
7777 update_panel ( owner, num_children) ;
7878 }
7979
80- #[ export]
80+ #[ gdnative :: derive :: export]
8181 fn remove_one ( & mut self , owner : & Spatial , str : GodotString ) {
8282 godot_print ! ( "Called remove_one({})" , str ) ;
8383 let num_children = owner. get_child_count ( ) ;
@@ -116,7 +116,7 @@ pub fn load_scene(path: &str) -> Option<Ref<PackedScene, ThreadLocal>> {
116116/// scene as the root. For instance Spatial is used for this example.
117117fn instance_scene < Root > ( scene : & PackedScene ) -> Result < Ref < Root , Unique > , ManageErrs >
118118where
119- Root : gdnative:: GodotObject < RefKind = ManuallyManaged > + SubClass < Node > ,
119+ Root : gdnative:: object :: GodotObject < RefKind = ManuallyManaged > + SubClass < Node > ,
120120{
121121 let instance = scene
122122 . instance ( PackedScene :: GEN_EDIT_STATE_DISABLED )
0 commit comments