[英]UI Scrollbar Scroll Sensitivity For Mouse Wheel Scroll
I am trying to adjust the scrollbar scroll speed because it is too slow. 我正在尝试调整滚动条滚动速度,因为它太慢了。 I only found this on the web. 我只在网上找到了这个。 But I don't know how to use it. 但我不知道如何使用它。
UI.ScrollRect.scrollSensitivity
I am trying this to create a Text
that contains some information (like what's new in unity 5.3? ) 我正在尝试创建一个包含一些信息的Text
(比如统一5.3中的新内容?)
I think I know what is your problem, and I hope this is the solution for it. 我想我知道你的问题是什么,我希望这是解决方案。
You were trying to set the value of UI.ScrollRect.scrollSensitivity
without an instance of ScrollRect
object. 你试图设置的值UI.ScrollRect.scrollSensitivity
没有实例ScrollRect
对象。
To set the sensitivity you need an instance of it and set it like this: 要设置灵敏度,您需要一个实例,并将其设置如下:
public ScrollRect scroll;
void Start()
{
scroll.scrollSensitivity = 27f;
}
Also you can set it directly from Inpsector: 您也可以直接从Inpsector中设置它:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.