File tree Expand file tree Collapse file tree 2 files changed +27
-10
lines changed Expand file tree Collapse file tree 2 files changed +27
-10
lines changed Original file line number Diff line number Diff line change @@ -52,12 +52,21 @@ unsafe fn check_api_compatibility(
52
52
next,
53
53
} = * api;
54
54
55
+ // Note: this code ensured that Godot 4 (which was back then GDNative 1.3) wasn't actually used.
56
+ // Godot uses now GDExtension, so this no longer applies. Keep this around in case old Godot 4 versions still
57
+ // need to be detected in the future. Now just check against minor version 1.
58
+ // See also: gdnative-sys/build.rs:485
59
+ // See also: https://github.com/godot-rust/godot-rust/issues/904
60
+
55
61
// Godot 4 is not yet supported
56
62
if type_ as crate :: sys:: GDNATIVE_API_TYPES == crate :: sys:: GDNATIVE_API_TYPES_GDNATIVE_CORE
57
- && version. major = = 1
58
- && version. minor == 3
63
+ && version. major ! = 1
64
+ // && version.major == 1 && version.minor == 3 (old check)
59
65
{
60
- return Err ( sys:: InitError :: Generic { message : "GodotEngine v4.* is not yet supported. See https://github.com/godot-rust/godot-rust/issues/396" . into ( ) } ) ;
66
+ return Err ( sys:: InitError :: Generic {
67
+ message : "GDNative major version 1 expected" . into ( ) ,
68
+ } ) ;
69
+ //return Err(sys::InitError::Generic{ message: "GodotEngine v4.* is not yet supported. See https://github.com/godot-rust/godot-rust/issues/396".into() });
61
70
}
62
71
63
72
api = next;
Original file line number Diff line number Diff line change @@ -482,13 +482,21 @@ mod api_wrapper {
482
482
let api_root: ApiRoot = miniserde:: json:: from_str ( & api_json_file)
483
483
. unwrap_or_else ( |_| panic ! ( "Could not parse ({:?}) into ApiRoot" , from_json) ) ;
484
484
485
- for api in api_root. all_apis ( ) {
486
- // Currently don't support Godot 4.0
487
- assert ! (
488
- !( api. version. major == 1 && api. version. minor == 3 ) ,
489
- "GodotEngine v4.* is not yet supported. See https://github.com/godot-rust/godot-rust/issues/396"
490
- ) ;
491
- }
485
+ // Note: this code ensured that Godot 4 (which was back then GDNative 1.3) wasn't actually used.
486
+ // Godot uses now GDExtension, so this no longer applies. In fact, different module APIs all have different versions.
487
+ // See also: https://github.com/godot-rust/godot-rust/issues/904
488
+
489
+ // Listed versions for Godot 3.5 RC:
490
+ // * CORE 1.0
491
+ // * CORE 1.1
492
+ // * CORE 1.2
493
+ // * NATIVESCRIPT 1.0
494
+ // * NATIVESCRIPT 1.1
495
+ // * PLUGINSCRIPT 1.0
496
+ // * ARVR 1.1
497
+ // * VIDEODECODER 0.1
498
+ // * NET 3.1
499
+ // * NET 3.2
492
500
493
501
let struct_fields = godot_api_functions ( & api_root) ;
494
502
let impl_constructor = api_constructor ( & api_root) ;
You can’t perform that action at this time.
0 commit comments