Error Unity. Need Help

Hello, why ocurre this sort of error???
Assets\Tower\TargetLocator.cs(21,27): error CS0029: Cannot implicitly convert type ‘Enemy’ to ‘Enemy


It’s because you are trying to cast a single object to an array of objects. You are using the function that returns one single enemy. You probably want to use FindObjectsOfType<Enemy>(); (see the Objects there)

Thank you!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms