-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Custom resources won't work with Mono, leads to constant crashes #15210
Comments
Is this issue still reproducible in the latest master? There have recently been some changes to Mono/C# class extensions which may have helped. |
I can confirm on fa02453 that this crash no longer happens, however types don't show up in the Resource popup menu, so I decided to take a stab at it. It looks like GDScript somehow registers each parsed type to the ClassDB (Then handles exporting in it's info) I guess that's the way to go for Mono. Does anyone have any insights? Essentially I think we can update the ClassDB after a successful build from the project assembly (I wrote some quick classes to iterate over all classes \ get all classes that inherit type using the raw Mono API and some of the mono module API). EDIT: Okay after searching for a while I believe I am actually looking to liaison with ScriptServer, when it inits it looks through the "_global_script_classes" array. |
Okay, I believe whatever writes to filesystem_cache4 is used to add to the global script classes. It seems the mono module scripts don't get their script_class_name \ script_class_extends written to e.g:
|
Can anyone still reproduce this bug in Godot 3.2.1 or any later release (e.g. 3.2.2-beta4)? If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop. |
Closing due to lack of update. Please comment if you can still reproduce this issue in the latest stable version of Godot. |
Adding custom "data-container" resources (classes that inherit from Resource) will not work with Mono. Gets the editor to crash constantly.
Steps to reproduce:
public class MyResource : Godot.Resource
string name;
)MyResource
as its scriptThe steps above will work just fine if you use GDScript.
The text was updated successfully, but these errors were encountered: