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

[4.3] Replace Godot deprecated functions #499

Merged
merged 1 commit into from
Oct 26, 2024

Conversation

feiyunw
Copy link
Contributor

@feiyunw feiyunw commented Sep 25, 2024

Image::create() is deprecated, thus it does not exist if Godot is built with the Scons option "deprecated=no".
It must be changed to Image::create_empty() for better compatibility.

FYI:
https://github.com/godotengine/godot/blob/4.3-stable/core/io/image.cpp#L3428

@TokisanGames TokisanGames self-assigned this Sep 25, 2024
@TokisanGames
Copy link
Owner

Thanks for this. However, this function does not exist in 4.2 and we're not ready to discontinue support yet. So, this PR can either alias create_empty if building in 4.2 or this PR will sit for a while until we're ready to drop 4.2.

@TokisanGames TokisanGames removed their assignment Sep 25, 2024
@TokisanGames TokisanGames added this to the Stable 1.0.x milestone Sep 28, 2024
@feiyunw
Copy link
Contributor Author

feiyunw commented Oct 2, 2024

Another problem for "deprecated=no" is that Godot is replacing NavigationMeshGenerator with the next generation Navigation and NavMeshComponents.

  res://addons/terrain_3d/src/baker.gd:197 - Parse Error: Identifier "NavigationMeshGenerator" not declared in the current scope.
  res://addons/terrain_3d/src/baker.gd:207 - Parse Error: Identifier "NavigationMeshGenerator" not declared in the current scope.
  res://addons/terrain_3d/src/terrain_menu.gd:-1 - Compile Error: 
  res://addons/terrain_3d/src/ui.gd:-1 - Compile Error: 
  res://addons/terrain_3d/editor.gd:-1 - Compile Error: 
  modules\gdscript\gdscript.cpp:2936 - Failed to load script "res://addons/terrain_3d/editor.gd" with error "Compilation failed". (User)
  res://addons/terrain_3d/src/terrain_menu.gd:12 - Invalid call. Nonexistent function 'new' in base 'GDScript'.
  res://addons/terrain_3d/src/terrain_menu.gd:30 - Invalid assignment of property or key 'plugin' with value of type 'EditorPlugin (editor.gd)' on a base object of type 'Nil'.

A new commit was submitted.

FYI:
https://github.com/godotengine/godot/blob/4.3-stable/modules/navigation/register_types.cpp#L50

@TokisanGames TokisanGames changed the title Change Image::create() to Image::create_empty() [4.3] Change Image::create() to Image::create_empty() Oct 2, 2024
@TokisanGames TokisanGames changed the title [4.3] Change Image::create() to Image::create_empty() [4.3] Replace deprecated functions Oct 2, 2024
@TokisanGames TokisanGames changed the title [4.3] Replace deprecated functions [4.3] Replace Godot deprecated functions Oct 2, 2024
@TokisanGames TokisanGames modified the milestones: 1.1, 1.0 Oct 6, 2024
@TokisanGames TokisanGames merged commit a01ae22 into TokisanGames:main Oct 26, 2024
13 checks passed
@TokisanGames
Copy link
Owner

Thank you!

@feiyunw feiyunw deleted the no_deprecated branch October 26, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants