Question by
saiyaswanth · Aug 03, 2016 at 06:08 AM ·
unity4
I added some values and get some sum when mouseUp event occures but when I click submit button the sum become zero I dont know why it happens please help me.
public void OnMouseUp(){ Debug.Log ("OnMouseUp"); sum1 =gameObject.GetComponent().value;
total=count+sum1;
count= total;
Debug.Log ("col"+count);
}
public void OnSubmitButtonClick(){
//count value is appear zero here Debug.Log ("count="+count); if (count.ToString () == question_Txt.text) { //Application.LoadLevel ("LastScene"); }
Comment
Your answer
Follow this Question
Related Questions
My player isn't moving ! 0 Answers
Where are the FPSController prefab's Graphics and Main Camera children in Unity 5 0 Answers
how can I change the interpolation type of animationclip's rotation property 1 Answer
I am new for making multiplayer game like pubg 1 Answer
How to disable LockTexture in case of LEVEL UNLOCK SYSTEM IN UNITY? 0 Answers