Skip to content

Conversation

@Bromeon
Copy link
Member

@Bromeon Bromeon commented Jan 6, 2025

Before Godot 4.4, there is no API to call static functions via reflection, so I had to be creative with the polyfill in #989.

As a result, the added Callable::from_local_static() exposes some unintuitive behavior with the implementation on Godot 4.1 - 4.3:

  • is_valid() returns false, even though the call itself will work.
  • The Callable cannot be used in signals (due to the above).

This PR adds tests and documents this.

@Bromeon Bromeon added documentation Improvements or additions to documentation c: core Core components labels Jan 6, 2025
@GodotRust
Copy link

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1004

@Bromeon Bromeon force-pushed the doc/callable-static-limitations branch from 295995b to 8f2da0a Compare January 6, 2025 21:18
@Bromeon Bromeon added this pull request to the merge queue Jan 6, 2025
Merged via the queue into master with commit 6a5d19d Jan 6, 2025
15 checks passed
@Bromeon Bromeon deleted the doc/callable-static-limitations branch January 6, 2025 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: core Core components documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants