[Range(5, 50)]
public int waypointsCount = 10;
private System.Random random = new System.Random();
// Use this for initialization
void Start ()
{
var Nodes = UnityEngine.GameObject.FindGameObjectsWithTag("Node");
}
I want to get a random number of gameobjects
from Nodes
according to the number in waypointsCount
. So if for example the number is 10
then I want to get 10
random gameobjects
from the array nodes. And the gameobjects
should not be duplicates.