private void Start() { pathTool = gameObject.GetComponentInParent <AutoPathTool>(); ArrowMaterial = GetComponent <MeshRenderer>(); color = ArrowMaterial.material.color; }
private void OnEnable() { pathTool = gameObject.GetComponentInParent <AutoPathTool>(); a = 0.8f; InvokeRepeating("MaterialAniomation", 0, PlaySpped); CurrentStepLength = 0; Points = new Vector3[pathTool.PathPoints.Count]; for (int i = 0; i < pathTool.PathPoints.Count; i++) { Points[i] = pathTool.PathPoints[i]; } }