use pattern match in ExtResource