Generating random values without any duplicates or repetitions

Hi everybody,
I’m kind of new at coding and this is probably a dump question. I did some googling to try to find an answer and there is a lot out there about generating random numbers, but very little or nothing in how to avoid duplicated results. Here is my code for a function that works and creates random Integers, but I need those Integers not to be repeated or duplicated and I’m just stuck here. I please need some directions in how to approach the problem. Thanks in advance!

private void InstantiateSegments (){

int quantity;
float creationValue;

creationValue = Random.value;
quantity = Mathf.RoundToInt (45 * creationValue + 12);
print (quantity);
}

Hi Nachman,
This post shows some examples on creating unique values.

Thank you very much Duugu!