当Unity中的timeScale为0时,如何使TrailRenderer工作? [英] How to make TrailRenderer work when timeScale is 0 in Unity?

查看:284
本文介绍了当Unity中的timeScale为0时,如何使TrailRenderer工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在游戏暂停时使用TrailRenderer,但是由于timeScale为0,因此结果deltaTime为0,这导致TrailRenderer不起作用(尾巴永不消亡)

I want to use TrailRenderer when my game is paused, but since timeScale is 0 the resulting deltaTime is 0, this caused TrailRenderer to not function (the tail never dies)

我发现可以手动设置更新持续时间或调用TrailRenderer更新的任何参数.

I dint find any parameter to be able to manually set the update duration or call update of TrailRenderer.

就像动画师一样,我们可以选择在"UnscaledDeltaTime"中对其进行更新,我该如何为TrailRenderer进行更新?

Like in An Animator we have the option to make it update in "UnscaledDeltaTime", how can i do it for a TrailRenderer?

我还尝试在反编译的Trail Renderer中手动添加它,但是似乎在C#中没有Trail Renderer代码

I also tried to add it manually in the decompiled Trail Renderer but it seem trail renderer code in not in C#

推荐答案

似乎 unscaledTime 是您想要的.

与时间不同,该值不受timeScale的影响.

Unlike time this value is not affected by timeScale.

这篇关于当Unity中的timeScale为0时,如何使TrailRenderer工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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