File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -38,14 +38,16 @@ macro_rules! godot_nativescript_init {
38
38
// Compatibility warning if using in-house Godot version (not applicable for custom ones)
39
39
#[ cfg( not( feature = "custom-godot" ) ) ]
40
40
{
41
+ use $crate:: core_types:: Variant ;
42
+
41
43
let engine = gdnative:: api:: Engine :: godot_singleton( ) ;
42
44
let info = engine. get_version_info( ) ;
43
45
44
46
if info. get( "major" ) . expect( "major version" ) != Variant :: new( 3 )
45
47
|| info. get( "minor" ) . expect( "minor version" ) != Variant :: new( 5 )
46
48
|| info. get( "patch" ) . expect( "patch version" ) < Variant :: new( 1 ) {
47
49
let string = info. get( "string" ) . expect( "version str" ) . to:: <String >( ) . expect( "version str type" ) ;
48
- gdnative :: log:: godot_warn!(
50
+ $crate :: log:: godot_warn!(
49
51
"This godot-rust version is only compatible with Godot >= 3.5.1 and < 3.6; detected version {}.\n \
50
52
GDNative mismatches may lead to subtle bugs, undefined behavior or crashes at runtime.\n \
51
53
Apply the 'custom-godot' feature if you want to use current godot-rust with another Godot engine version.",
You can’t perform that action at this time.
0 commit comments