I am attempting to do the random challenge but i prefer to use Network.time to generate a random seed as it calls on the time on the network or some function that calls on the time of the computer system.
the problem I am running into is needing to convert the Network.time value (which is of type double) and converting to type int and/or type float.
I am using a simple test process by declaring:
double d = 5000.07;
int IBS;
Now i need the function call to convert d to IBS, which will yield 5000 to be stored in IBS.
Then print to screen d and IBS to confirm success
I have looked through the unity API and have found nothing relatable so far. I have also googled and Microsoft has this https://www.tutorialspoint.com/csharp/csharp_type_conversion.htm
So far I have not been able to get anything to work.
Got it to work. Had to add “using system”; at top of script. Then use IBS = Convert.ToInt16(d); to make conversion. Conversion options are listed in the prior link.
