Quantcast
Channel: Answers for "Deactivate running of Update function"
Browsing all 4 articles
Browse latest View live

Answer by Pawscal

you could do something like void Update () { if (Input.GetMouseButton (0)) { transform.parent.Translate(Vector3.down*Time.deltaTime*4); } } it should work, no need to use OnMouseDown

View Article



Answer by HarshadK

You can get a reference to the MoveBlock script in your StopBlockMovement script then you can set enabled flag to false for that script and it will stop the running of update function (along with any...

View Article

Answer by Pawscal

you could do something like void Update () { if (Input.GetMouseButton (0)) { transform.parent.Translate(Vector3.down*Time.deltaTime*4); } } it should work, no need to use OnMouseDown

View Article

Answer by HarshadK

You can get a reference to the MoveBlock script in your StopBlockMovement script then you can set enabled flag to false for that script and it will stop the running of update function (along with any...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images