游戏暂停时如何播放动画(时间比例= 0) [英] How to play animations while the game is paused (timescale = 0)

查看:142
本文介绍了游戏暂停时如何播放动画(时间比例= 0)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过以下方式来暂停Unity中的游戏:在暂停面板出现时将timeScale设置为0,而在禁用面板时将其设置回1.我遇到的问题是,当我暂停时,面板上的按钮没有显示其动画,因为时间标度为0.还是我应该找到另一种无需使用时间刻度的暂停方法?

I am trying to pause a game in Unity using by setting timeScale to 0 when the pause panel comes up, and setting it back to 1 when the panel is disabled. The problem I am having is that when I Pause, the buttons on the panel are not showing their animation as the time scale is 0. Is there anyway around this? Or should I find another way to do the pause without using the timescale?

推荐答案

在Animator组件中查找更新模式选项,然后选择无标度时间.像这样:

In your Animator component look for Update Mode option and select Unscaled Time. Like this :

这篇关于游戏暂停时如何播放动画(时间比例= 0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆