- Home /
Maintain the parameters associated with a Object?
Hello,
I have several modular units which I use inside that game in a random manner. The size of these units, differ heavily and hence when I use them - those respective units come into play. When I size, it is X, Y ,Z and referenceObject. Now I want to know whether it is possible to store 4 values thro' code.
For eg, if I had to store only the length then I would use a dictionary with the "key" being the (string)Transform and the "value" being the length of the Transform.
Thank you
Answer by AntiLunchBox · Jun 13, 2013 at 07:24 PM
you can use objects. as in objects, not Objects.
so you can have
object[] params = new object[] { x, y, z, myObject};
And with that, you can use params as the Value in your dictionary or list. Just know what index is what when your accessing params.
Oh cool. @antiLuchBox.
Just use an array would do the job. Never thought about it. Thank you.
Your answer
Follow this Question
Related Questions
GUITexture is lagging my object 0 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Distribute terrain in zones 3 Answers
Soft turn with joystick 0 Answers
Multiple Cars not working 1 Answer