What is CS0664?


  • When trying to enter play mode, I am receiving the error below:
error CS0664: Literal of type double cannot be implicitly converted to type `float'. Add suffix `f' to create a literal of this type


The CS0664 error is caused when a number with a decimal place is entered when declaring a float but does not include the`f' suffix. Please see the example below.


The error CS0664 is resolved by adding the `f' suffix to the end of the value that you are assigning to the float. See the example below.


More Information

For more information please read


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.