Symptoms
When trying to enter play mode, I am receiving the error below:
error CS0127: `__': A return keyword must not be followed by any
expression when method returns void
Cause
The CS0127 error is caused when a method trying to return a value uses void as it's return value type.
Here is how the error appears in this example:
error CS0127: `ExampleScript.MyMethod()': A return keyword must not be followed by any
expression when method returns void
Resolution
The error CS0127 is resolved by changing the return value type to reflect the type that is being returned. In this example the return type is int as we are returning a value of type int.
More Information
https://msdn.microsoft.com/en-us/library/wttka33z(v=vs.90).aspx