Fix obsolete API for handle caps.
This commit is contained in:
Родитель
ac1ae26a6c
Коммит
dd242bb276
|
@ -206,7 +206,7 @@ namespace UnityEditor.AI
|
|||
if (navLink.GetInstanceID() == s_SelectedID && s_SelectedPoint == 0)
|
||||
{
|
||||
EditorGUI.BeginChangeCheck();
|
||||
Handles.CubeCap(0, startPt, zup, 0.1f * startSize);
|
||||
Handles.CubeHandleCap(0, startPt, zup, 0.1f * startSize, Event.current.type);
|
||||
pos = Handles.PositionHandle(startPt, navLink.transform.rotation);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
|
@ -216,7 +216,7 @@ namespace UnityEditor.AI
|
|||
}
|
||||
else
|
||||
{
|
||||
if (Handles.Button(startPt, zup, 0.1f * startSize, 0.1f * startSize, Handles.CubeCap))
|
||||
if (Handles.Button(startPt, zup, 0.1f * startSize, 0.1f * startSize, Handles.CubeHandleCap))
|
||||
{
|
||||
s_SelectedPoint = 0;
|
||||
s_SelectedID = navLink.GetInstanceID();
|
||||
|
@ -226,7 +226,7 @@ namespace UnityEditor.AI
|
|||
if (navLink.GetInstanceID() == s_SelectedID && s_SelectedPoint == 1)
|
||||
{
|
||||
EditorGUI.BeginChangeCheck();
|
||||
Handles.CubeCap(0, endPt, zup, 0.1f * startSize);
|
||||
Handles.CubeHandleCap(0, endPt, zup, 0.1f * startSize, Event.current.type);
|
||||
pos = Handles.PositionHandle(endPt, navLink.transform.rotation);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
|
@ -236,7 +236,7 @@ namespace UnityEditor.AI
|
|||
}
|
||||
else
|
||||
{
|
||||
if (Handles.Button(endPt, zup, 0.1f * endSize, 0.1f * endSize, Handles.CubeCap))
|
||||
if (Handles.Button(endPt, zup, 0.1f * endSize, 0.1f * endSize, Handles.CubeHandleCap))
|
||||
{
|
||||
s_SelectedPoint = 1;
|
||||
s_SelectedID = navLink.GetInstanceID();
|
||||
|
@ -244,7 +244,7 @@ namespace UnityEditor.AI
|
|||
}
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
pos = Handles.Slider(midPt + right * navLink.width * 0.5f, right, midSize * 0.03f, Handles.DotCap, 0);
|
||||
pos = Handles.Slider(midPt + right * navLink.width * 0.5f, right, midSize * 0.03f, Handles.DotHandleCap, 0);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(navLink, "Adjust link width");
|
||||
|
@ -252,7 +252,7 @@ namespace UnityEditor.AI
|
|||
}
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
pos = Handles.Slider(midPt - right * navLink.width * 0.5f, -right, midSize * 0.03f, Handles.DotCap, 0);
|
||||
pos = Handles.Slider(midPt - right * navLink.width * 0.5f, -right, midSize * 0.03f, Handles.DotHandleCap, 0);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(navLink, "Adjust link width");
|
||||
|
|
Загрузка…
Ссылка в новой задаче