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

Can't create callables from static methods #481

Open
LeaoLuciano opened this issue Nov 12, 2023 · 0 comments
Open

Can't create callables from static methods #481

LeaoLuciano opened this issue Nov 12, 2023 · 0 comments
Labels
c: core Core components feature Adds functionality to the library

Comments

@LeaoLuciano
Copy link
Contributor

LeaoLuciano commented Nov 12, 2023

Currently there is no way to create a callable (from gdext or gdscript) from a static method of a gdext's class.

Gdext's Callable has no constructor for static methods (Callable).

Gdscript returns an error when trying to use a callable from a static method:

func _ready():
	Test.static_method()       
	Test.static_method.call()  # Error

MRP

static_callable.zip

Steps

Compile rust code in rust/
Run main.tscn

@Bromeon Bromeon added feature Adds functionality to the library c: core Core components labels Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: core Core components feature Adds functionality to the library
Projects
None yet
Development

No branches or pull requests

2 participants