0 votes

I want to make my own costum ressource to handle "RoomData" in my dungeon crowler game,

the problem is that Im using c# and there is this problem with godot currently where a costum ressource made in c# doesn't appear in the inspector, so I have to make the resource in GdScript and then use Cross Language Scripting to access it in my c# script

my issue is that I don't know how to make a resource variable in my c# script, this gives me an error obviously:

[export]
Private RoomData data;

because there is no such class called "RoomData" in c#, (the class is in GdScript remember)

I know I can do something like this to get a refrence to an object or script:

Private GDScript MyGDScript = (GDScript) GD.Load("res://path_to_gd_file.gd");

but how do I get a refrence to a Class so I can use it to make variables ?

Short Version:
I have a GdScript called "RoomData" that extends "Resource"
I also have a C# script that should use the RoomData resource as an Export
but I can't do that becuase this Private RoomData data gives me an error

Godot version v3.2.3 stable mono
in Engine by (12 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.