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

ERROR: Invalid call. Nonexistent function 'get_navigation_map' in base 'Godot.NavigationLink2D'. #101047

Closed
ChekhWasTaken opened this issue Jan 2, 2025 · 6 comments
Labels

Comments

@ChekhWasTaken
Copy link

ChekhWasTaken commented Jan 2, 2025

Tested versions

v4.3.stable.mono.official [77dcf97]

System information

Godot v4.3.stable.mono - macOS 13.7.2 - GLES3 (Compatibility) - AMD Radeon Pro 560 OpenGL Engine - Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz (8 Threads)

Issue description

According to NavigationLink2D documentation, we should be able to call set_navigation_map to set the RID of map the link should be active in.

However this method is not available in C#:

Image

When calling with .Call

navigationLink2D.Call("set_navigation_map", mapRid);
navigationLink2D.Call("get_navigation_map", mapRid);

i'm getting following errors:

ERROR: Invalid call. Nonexistent function 'set_navigation_map' in base 'Godot.NavigationLink2D'.
ERROR: Invalid call. Nonexistent function 'get_navigation_map' in base 'Godot.NavigationLink2D'.

Steps to reproduce

  • Create a NavigationLink2D node
  • try to set/get navigation map RID from the link

Minimal reproduction project (MRP)

N/A

@AThousandShips
Copy link
Member

The setters and getters aren't available in C#, you need to do:

navigationLink2D.NavigationMap = myMap;

See the documentation page C# differences to GDScript

@ChekhWasTaken
Copy link
Author

@AThousandShips thanks for the response.

i'd like to clarify that the setter is not available in gdscript either.

trying with the property syntax is same result:

Image

@raulsntos
Copy link
Member

This API was added in 4.4:

I guess the stable documentation includes this because the PR was cherry-picked for 4.3.1, but this version hasn't been released yet.

@akien-mga
Copy link
Member

Indeed, that seems to be the case.

CC @mhilbrunner - we should maybe only sync classref on stable branches on the latest tag in the given branch, if we can find this info from GitHub's API.

@ChekhWasTaken
Copy link
Author

ChekhWasTaken commented Jan 3, 2025

@raulsntos @akien-mga any guidance on how to set the navigation map on a NavigationLink2D for <v4.4?

@AThousandShips
Copy link
Member

AThousandShips commented Jan 3, 2025

My bad missed that this was indeed a method and not a property, but missed it wasn't in 4.3, good catch

You will be able to use it when 4.3.1 releases! You might also be able to set it using the server, using the RID of the link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants