Heterogeneous array literals
func AcceptVariants(variants: array<Variant>) {}// all elements get implicitly converted to Variant
AcceptVariants([1, new Vector2(1, 2), new inkText()]);
// you can achieve the same thing with an explicitly typed local
let variants: array<Variant> = [1, new Vector2(1, 2), new inkText()];Last updated
Was this helpful?