#Export typed array doesn't contraint type

8 messages · Page 1 of 1 (latest)

stray portal
#

I have this typed array export :
@export var general : Array[Rule] = ...
But when modifying the general property in the inspector, I can choose from any resource possible, instead of only being able to add a Rule to the array...

vital warren
#

I was unable to reproduce this. 🤷‍♂️

stray portal
vital warren
stray portal
#

Found the issue. Apparently, a default value breaks it.

vital warren
#

Nice.

stray portal
#

so @export var thing : Array[Type] works but not @export var thing : Array[Type] = []. Funny

#

that's a bug report for the Godot Engine git :)