예제 #1
0
 void Start()
 {
     mcamera                = Camera.main;
     cameralines            = mcamera.GetComponent <BoundBoxes_drawLines>();
     cameralines.boxManager = this;
     init();
 }
예제 #2
0
    void Start()
    {
        mcamera     = Camera.main;
        cameralines = mcamera.GetComponent <BoundBoxes_drawLines>();

        PrepareBounds();
    }
예제 #3
0
 public void init()
 {
     originalSize = transform.localScale.x;
     cameralines  = Camera.main.GetComponent <BoundBoxes_drawLines> ();
     calculateBounds();
     setPoints();
     setLines();
     if (cameralines != null)
     {
         if (lineID == 0)
         {
             lineID = cameralines.AddOutlines(lines, lineColor);
         }
         else
         {
             cameralines.SetOutlines(lineID, lines, lineColor);
         }
     }
 }
예제 #4
0
    void Start()
    {
//		if (mcamera == null) {
//			mcamera = Camera.main;
//		}
//		cameralines = mcamera.GetComponent<BoundBoxes_drawLines>();

        Camera[] cameras = Camera.allCameras;
        foreach (Camera c in cameras)
        {
            mcamera     = c;
            cameralines = mcamera.GetComponent <BoundBoxes_drawLines>();
            if (cameralines != null)
            {
                break;
            }
        }
        init();
    }
예제 #5
0
 void Start()
 {
     mcamera     = mcamera ?? Camera.main;
     cameralines = mcamera.GetComponent <BoundBoxes_drawLines>();
     init();
 }
 void Start()
 {
     mcamera = Camera.main;
     cameralines = mcamera.GetComponent<BoundBoxes_drawLines>();
     init();
 }