dimanche 8 novembre 2020

Why I cant use Random.Range code system on Unity 2D

I was using this code in unity 2D:

    float nilaiRandom;
    void Start()
    {
        nilaiRandom = Random.Range(1.11f, -1.88f);
        transform.position = new Vector2(transform.position.x, nilaiRandom);
    }

Unity count Error it says:Assets\Go.cs(14,23): error CS0104: 'Random' is an ambiguous reference between 'UnityEngine.Random' and 'System.Random' What actually happened to my unity and what is the solution? please help me




Aucun commentaire:

Enregistrer un commentaire