Is it possible to give a start value to a variable that has a get and setter? So it should look something like this:
public static float myVariable = 10 {get; set;};
Thanks in advance.
Edit:
Working in C#
Edit 2:
So I tried this:
public static class GlobalVariables {
public static float groundSearchRayDistance{get;}
static GlobalVariables()
{
groundSearchRayDistance = 10;
}
}
But it doesn't work.