Custom resources are not displayed

Godot Version

4.2 Mono

Question

using Godot;

public partial class AttackResource : Resource
{
    public enum AttackType {Melee, Range};
    public enum DamageType {Physical, Magic, Pure};

    [Export] public int Damage;
    [Export] AttackType attackType;
    [Export] DamageType damageType;
}

I wrote the code for my resource, but after I build the project, my resource didn’t show up in resources.

You need [GlobalClass], see C# global classes — Godot Engine (stable) documentation in English

Thanks, that worked, it’s strange that the official resource documentation doesn’t have that.

It doesn’t mention this part of the feature at all, but could do with a little more detail

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.