i just made a PlayerSpell class and two variables of it A and B.
i wrote:
B = A;
in the Update() just as a check to see how they work, and it turns out that I’m able to change B and all the changes are updated into A. i thought info was supposed to come over the ‘=’ from left and go into the right side? so it would basically read B is equal to A.
but it seems to be the opposite. A is equal to B… am i doing something wrong or is this the way it goes in unity script? or does the fact that they are classes have something to do with it?
ok, that makes sense thank you.
– hardmode2236do you think you could give me a quick javascript example of a struct? i tried looking around the internets, but i couldn't figure out the syntax. (if you know javascript that is)
– hardmode2236@hardmode: You may be interested in reading this post: [Struct in JavaScript][1] [1]: http://answers.unity3d.com/questions/23044/struct-in-javascript.html
– greenshadow@hardmode - good reference. JavaScript makes it a bit more difficult.
– robertbuok thanks, ill look into that!
– hardmode2236