convert to float unity code example
Example 1: unity transformer double en float
float myFloat;
double myDouble;
void Start()
{
myFloat = (float)myDouble; //give the value of myDouble to myFloat
}
Example 2: unity cast int to float
//(float) casts float or int after it to an float
intVar = (float)var