void Start() { mcamera = Camera.main; cameralines = mcamera.GetComponent <BoundBoxes_drawLines>(); cameralines.boxManager = this; init(); }
void Start() { mcamera = Camera.main; cameralines = mcamera.GetComponent <BoundBoxes_drawLines>(); PrepareBounds(); }
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); } } }
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(); }
void Start() { mcamera = mcamera ?? Camera.main; cameralines = mcamera.GetComponent <BoundBoxes_drawLines>(); init(); }
void Start() { mcamera = Camera.main; cameralines = mcamera.GetComponent<BoundBoxes_drawLines>(); init(); }