0 votes

Hi,

Is it possible to access static c# classes from gdscript?
preload() does not work on classes that do not extend Godot.Object, and static classes need to extend System.Object directly.

A hacky solution is to just create a non static class that extends Godot.Object and make all functions static, but that way it could be instantiated, which I would like to avoid syntactically to avoid confusion when sharing the code.

Thanks,
Pomelo

Godot version 3.2.3
in Engine by (24 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.