I created a method in my spawn manager trying to get the maximum and minimum with of spawn to be within the screen but i keep on getting the error
error CS0161: `SpawnManager.GetRandomPointOnScreen()': not all code paths return a value
does anyone have an idea as to what might be causing this error
Vector3 GetRandomPointOnScreen()
{
Camera camera = Camera.main;
float halfHeight = camera.orthographicSize;
float halfWidth = camera.aspect * halfHeight;
float horizontalMin = -halfWidth;
float horizontalMax = halfWidth;
}
No comments:
Post a Comment