Guest User

Untitled

a guest
Feb 19th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. [CustomEditor(typeof(mainCameraScript))]
  2. public class DrawLines : Editor
  3. {
  4.     protected void OnSceneGUI()
  5.     {
  6.         mainCameraScript mainScript = (mainCameraScript)target;
  7.         CutScene cutScene = null;
  8.         foreach(CutScene cut in mainScript.listOfCutScenes)
  9.         {
  10.             if (cut.showDropDown) cutScene = cut;
  11.             break;
  12.         }
  13.         Debug.Log(cutScene.waypointList.Count);
  14.         for(int i = 0; i<cutScene.waypointList.Count-1;i++)
  15.         {
  16.             Handles.DrawLine(cutScene.waypointList[i]._data.point.transform.position,
  17.                 cutScene.waypointList[i + 1]._data.point.transform.position);
  18.         }
  19.     }
  20.  
  21. }
Add Comment
Please, Sign In to add comment