コード例 #1
0
        private void ShowAllPathScene()
        {
            if (PathPoints.Count < 1)
            {
                return;
            }
            EditoolsHandle.SetColor(PathColor);

            for (int j = 0; j < Path.PathPoints.Count; j++)
            {
                Path.PathPoints[j] = EditoolsHandle.PositionHandle(Path.PathPoints[j], Quaternion.identity);
                EditoolsHandle.Label(Path.PathPoints[j] + Vector3.up * 5, $"Point {j + 1}");
                EditoolsHandle.SetColor(Color.white);
                EditoolsHandle.DrawDottedLine(Path.PathPoints[j] + Vector3.up * 5, Path.PathPoints[j], .5f);
                EditoolsHandle.SetColor(PathColor);
                EditoolsHandle.DrawSolidDisc(Path.PathPoints[j], Vector3.up, 0.1f);
                if (j < Path.PathPoints.Count - 1)
                {
                    EditoolsHandle.DrawLine(Path.PathPoints[j], Path.PathPoints[j + 1]);
                }
            }

            if (GetStartPercentIndex < 0 || GetStartPercentIndex > PathPoints.Count)
            {
                return;
            }
            EditoolsHandle.DrawDottedLine(PathPoints[GetStartPercentIndex], PathPoints[GetStartPercentIndex] + Vector3.up, 1);
            EditoolsHandle.Label(PathPoints[GetStartPercentIndex] + Vector3.up, $"Spawn Mark");
        }
コード例 #2
0
    void ShowAllPathUI()
    {
        for (int i = 0; i < eTarget.Paths.Count; i++)
        {
            PE_Path path = eTarget.Paths[i];
            if (!path.IsEditable)
            {
                continue;
            }
            EditoolsHandle.SetColor(path.PathColor);

            for (int j = 0; j < path.PathPoints.Count; j++)
            {
                path.PathPoints[j] = EditoolsHandle.PositionHandle(path.PathPoints[j], Quaternion.identity);
                EditoolsHandle.Label(path.PathPoints[j] + Vector3.up * 5, $"Point {j + 1}");
                EditoolsHandle.SetColor(Color.white);
                EditoolsHandle.DrawDottedLine(path.PathPoints[j] + Vector3.up * 5, path.PathPoints[j], .5f);
                EditoolsHandle.SetColor(path.PathColor);
                EditoolsHandle.DrawSolidDisc(path.PathPoints[j], Vector3.up, 0.1f);
                if (j < path.PathPoints.Count - 1)
                {
                    EditoolsHandle.DrawLine(path.PathPoints[j], path.PathPoints[j + 1]);
                }
            }
        }
    }