我在 unity 2D 中使用此代码:
float nilaiRandom;
void Start()
{
nilaiRandom = Random.Range(1.11f, -1.88f);
transform.position = new Vector2(transform.position.x, nilaiRandom);
}
Run Code Online (Sandbox Code Playgroud)
Unity count 错误它说:Assets\Go.cs(14,23): error CS0104: 'Random' is an ambiguous reference between 'UnityEngine.Random' and 'System.Random'
我的团结实际上发生了什么,解决方案是什么?请帮我