protected virtual void Start() { if (rope == null) { rope = Instantiate(GameManager.instance.RopeDrawerPrefab, transform).GetComponent <CableProceduralSimple>(); } var cP = transform.Find("ConnectionPoint"); if (cP != null) { cP.GetComponentInChildren <MeshRenderer>().enabled = true; connectionPosition = cP; rope.transform.position = connectionPosition.position; if (parent != null) { (parent as StaticNode).UpdateRopeEndTransform(); } } UpdateRopeEndTransform(); rope.sagAmplitude = 0f; rope.gameObject.SetActive(true); }
private void Awake() { rope = GetComponent <CableProceduralSimple>(); }