Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

godot_init may not find some symbols #954

Merged
merged 1 commit into from
Oct 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion gdnative-core/src/init/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,16 @@ macro_rules! godot_nativescript_init {
// Compatibility warning if using in-house Godot version (not applicable for custom ones)
#[cfg(not(feature = "custom-godot"))]
{
use $crate::core_types::Variant;

let engine = gdnative::api::Engine::godot_singleton();
let info = engine.get_version_info();

if info.get("major").expect("major version") != Variant::new(3)
|| info.get("minor").expect("minor version") != Variant::new(5)
|| info.get("patch").expect("patch version") < Variant::new(1) {
let string = info.get("string").expect("version str").to::<String>().expect("version str type");
gdnative::log::godot_warn!(
$crate::log::godot_warn!(
"This godot-rust version is only compatible with Godot >= 3.5.1 and < 3.6; detected version {}.\n\
GDNative mismatches may lead to subtle bugs, undefined behavior or crashes at runtime.\n\
Apply the 'custom-godot' feature if you want to use current godot-rust with another Godot engine version.",
Expand Down