private void CreatePointCallback() { if (currPoint) { currPoint.PlacePoint(); prevPoint = currPoint; prevPointColor = VRMPoint.RandColor(); prevPoint.SetEndColor(prevPointColor); } GameObject vrPointObj = (GameObject)Instantiate(vrPointPrefab, controller.transform.position, Quaternion.identity); currPoint = vrPointObj.GetComponent <VRMPoint>(); currPoint.LinkedController = gameObject; currPoint.SetStartColor(prevPointColor); }
void Start() { prevPointColor = VRMPoint.RandColor(); CreatePointCallback(); }