Horje
kotlin random number Code Example
kotlin random number
val randomNumber = (100..200).random()
kotlin random number

val rnds = (0..10).random() // generated random from 0 to 10 included

Source: devarama.com
random class in kotlin
import kotlin.random.Random
 
fun rand(start: Int, end: Int): Int {
    require(start <= end) { "Illegal Argument" }
    val rand = Random(System.nanoTime())
    return (start..end).random(rand)
}
 
fun main() {
    val start = 5
    val end = 9
 
    for (i in 1..5) println(rand(start, end))
}




Csharp

Related
invoke once on update unity Code Example invoke once on update unity Code Example
unity mirror get ip address Code Example unity mirror get ip address Code Example
Check object is in layermask unity Code Example Check object is in layermask unity Code Example
ontriggerenter Code Example ontriggerenter Code Example
how to find object by ag unity Code Example how to find object by ag unity Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11