hi i imported and old template into unity 2020 and after importing i got 3 errors related to the Handles.DrawSphere
specifically
Assets\Manoeuvre FPS + uzAI - MEGA PACK\Ultimate Zombie Artificial Intelligence [uzAI]\Scripts\Utilities\Editor\WaypointsPathEditor.cs(172,25): error CS7036: There is no argument given that corresponds to the required formal parameter ‘eventType’ of ‘Handles.SphereHandleCap(int, Vector3, Quaternion, float, EventType)’
I think it’s related to the fact that Handles.DrawSphere was deprecated and replaced with Handles.DrawpherCap I suppose…
btw the part of code related
private void DrawPositionHandles()
{
if (_wp.waypoints.Count < 1)
return;
for (int i = 0; i < _wp.waypoints.Count; i++)
{
if (_wp.waypoints[i] == null)
break;
_wp.waypoints[i].transform.position = Handles.PositionHandle(_wp.waypoints[i].transform.position, _wp.waypoints[i].transform.rotation);
Color c1 = Color.red;
c1.a = 0.5f;
Handles.color = c1;
Handles.Label(_wp.waypoints[i].transform.position, _wp.waypoints[i].transform.name);
Handles.DrawSphere(0, _wp.waypoints[i].transform.position, _wp.waypoints[i].transform.rotation, 1f);
}
}
void DrawPath()
{
for (int i = 0; i < _wp.waypoints.Count; i++)
{
if (_wp.waypoints[i] == null)
break;
Color c1 = Color.red;
c1.a = 0.5f;
Handles.color = c1;
Handles.Label(_wp.waypoints[i].transform.position, _wp.waypoints[i].transform.name);
Handles.DrawSphere(0, _wp.waypoints[i].transform.position, _wp.waypoints[i].transform.rotation, 1f);
}
if (_wp.waypoints.Count < 2)
return;
if (_wp.waypoints[startPoint] != null && _wp.waypoints[endPoint] != null && _wp.waypoints.Count > 1)
{
NavMeshPath path = new NavMeshPath();
Vector3 startPos = _wp.waypoints[startPoint].position;
Vector3 endPos = _wp.waypoints[endPoint].position;
NavMesh.CalculatePath(startPos, endPos, NavMesh.AllAreas, path);
Handles.color = Color.green;
Handles.DrawPolyLine(path.corners);
}
}
}
}
and the interested strings are these
Handles.DrawSphere(0, _wp.waypoints[i].transform.position, _wp.waypoints[i].transform.rotation, 1f);
Handles.DrawSphere(0, _wp.waypoints[i].transform.position, _wp.waypoints[i].transform.rotation, 1f);
and this in another script
Handles.DrawSphere(1,_ws._SpawnPoints[i].SpawnPoint.position, Quaternion.identity, 2f);
how must iIChange them to figure to Handles.SphereCap to make code to work?