Hi all,

I'm having an issue figuring out syntax in the 4.0 beta regarding exporting resources as a specific type.

For example, I have a resource:

class_name PlayerData
extends Resource

In 3.x, I could export that resource as:

export(Resource) var player_data = player_data as PlayerData

I can't figure out the equivalent syntax in 4.0 beta. I want to do:

@export var player_data: Resource = player_data as PlayerData

or

@export var player_data: Resource as PlayerData

but neither work, nor anything else I've tried.

Any ideas?

Thanks in advance!

spacecloud

Haha, I was sure I tried that and it didn't work, but it's working just fine now.

Thanks!