unity使用Random随机函数时
using UnityEngine;
using Random = System.Random;
public class TestPoint : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
float fl = Random.value;
}
}
Cannot resolve symbol 'value'
unity引用是正常的,可以看到Vector3等unity系统变量都正常。
Random.value 随机数为什么我无法使用,不明白请解惑,万法感谢!
你把这句using Random = System.Random;
给删除了,不需要这句话,这句话引用到其他地方了。