Question by
yingbao24 · Apr 01, 2016 at 06:55 AM ·
pause menu
when i pause a game using UI panel and freezing time, my falling coins in the level is still showing.
when i pause a game using UI panel and freezing time, my falling coins in the level is still showing.
Comment
We need more explanations, an image, and the piece of code where the problem occurs :)
Answer by yingbao24 · Apr 07, 2016 at 04:40 PM
public void OnMouseDown() {
{
paused = !paused;
}
if (paused) {
PauseUI.SetActive (true);
Time.timeScale = 0;
gameObject.active = false;
GameObject.Find ("Button").transform.localScale = new Vector3(0, 0, 0);
// Show button
}
if (!paused) {
PauseUI.SetActive (false);
Time.timeScale = 1;
GameObject.Find ("Button").transform.localScale = new Vector3(1, 1, 1);
}
}
simple code for calling
screen-shot-2016-04-07-at-123817-pm.png
(173.6 kB)
Your answer
![](https://koobas.hobune.stream/wayback/20220612073941im_/https://answers.unity.com/themes/thub/images/avi.jpg)