I was wondering if I could assign multiple variables to one object without having to assign it to a variable then assign them. So for example is it possible to convert this:
GameObject obj = Pooler.Instantiate().GetComponent<Asteroid>();
obj.speed = speed;
obj.direction = -1;
To look something like this:
Pooler.Instantiate().GetComponent<Asteroid>().({speed = speed, direction = -1});
When I do that, I get an error, so I was wondering if it was possible to do something like that?