Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Assets/scripts/JavaScripts/PerformanceTweak.js(218,45):BCE0051:运算符“<”不能与“Object”类型的左侧和“float”类型的右侧一起使用。
while( times.length > 0 && times[0] < 0.0 ) { times.Shift(); messages.Shift(); }
在我看来,它times[0]返回一个对象,而 0.0 是一个浮点数,无论哪种语言都不支持两者之间的比较,至少不支持这种形式。您需要找到一种方法来times[0]转换为浮动以进行适当的比较。这可能类似于:(float)times[0]或[times[0] floatValue]。(我不懂语言)
times[0]
(float)times[0]
[times[0] floatValue]