return from sp c# get value code example
Example: how to return a value in c#
void Start()
{
Debug.Log(Message()/*calling the function with its name*/);
}
string Message()/*you can make values to functions with () and {}*/
{
string message = "Hello world";
return message;//this says which value will be returned
}