Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

GDScript Resources to C# Export

An asset by PattyHoswell
The page banner background of a mountain and forest

Quick Information

No ratings yet
GDScript Resources to C# Export icon image
PattyHoswell
GDScript Resources to C# Export

Export resources written in GDScript to your C# script with the built-in attribute.

Supported Engine Version
4.2
Version String
1.1.0
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL
Download ZIP

GDScript-Resources-to-CSharp-Export

Export resources written in GDScript to your C# script with the built-in attribute, by default the [Export(PropertyHint.ResourceType, "...")] will still show all type that can be casted to Resources. This is especially troublesome when you want to export a resources that are written on GDScript to your C# script, and what this script does. Is that it creates a clone property of the original that actually use this attribute and will refer to the correct type.

https://github.com/PattyHoswell/GDScript-Resources-to-CSharp-Export/assets/94728986/5489b873-1346-470f-8769-0cbaeb448512

How To Use

Your script needs to have the [Tool] attribute that derives from ResourcesTypeExportWrapper. This ResourcesTypeExportWrapper derives from Node for the purpose of this examples. But you can change it to any type you want. Then you can use the [Export(PropertyHint.ResourceType, "...")] to your field/property that you want to have the resources on.

Additional Info

This example only provides you the means to export resources written in GDScript to C#. Please refer to the Cross-language scripting documentation if you want to read more about cross scripting.

Export resources written in GDScript to your C# script with the built-in attribute.

Reviews

0 total reviews
No ratings yet

Your Rating

How do you rate this asset?
Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

No ratings yet
GDScript Resources to C# Export icon image
PattyHoswell
GDScript Resources to C# Export

Export resources written in GDScript to your C# script with the built-in attribute.

Supported Engine Version
4.2
Version String
1.1.0
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL
Download ZIP

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers