// Update is called once per frame void Update() { if (!plane) { plane = FindObjectOfType <LocalPlane>(); if (!plane) { return; } } planeList = Utility.CreateVerticesFromPlane(plane.gameObject); tooClose = Utility.CheckIfTooCloseToEdge(planeList, transform.position, radius); }
// Update is called once per frame void Update() { if (!plane) { plane = FindObjectOfType <LocalPlane>(); if (!plane) { return; } } if (Input.GetKeyDown(KeyCode.T)) { GeneratePositions(); } }