- Home /
Question by
Skylermaki · Aug 20, 2013 at 10:42 PM ·
variableinvert
Store temp var / invert var
Hi, i have a problem, i don't know how to invert a var, the first will be modified and the second will copy the first.
//Icon move
if(Event.current.type == EventType.MouseUp && dragging){
skill[over_Number].text = skill[first_Number].text; // ----> The mouseOver text become the firstclic text
skill[first_Number].text = skill[over_Number].text; // -----> The firstclic text text become the mouseOver
dragging = false;
}
I have no idea how to do this, if you can help me, thanks :)
Comment
Best Answer
Answer by Joyrider · Aug 20, 2013 at 10:44 PM
Something like this:
string temp = skill[over_Number].text;
skill[over_Number].text = skill[first_Number].text;
skill[first_Number].text = temp ;
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Clearing a destination... 1 Answer
C# Declaring Variables Within If Statements 2 Answers
C# Accessing Variables from Class Variable 1 Answer
Prefab (Project Folder) to a GameObject (on the Scene) 2 Answers