internal void eraserAttach() { eraser = GameObject.Instantiate(PrefabManager.GetPrefab("Eraser2Prefab")).GetComponent <eraserBehave>(); eraser.transform.position = palmAttachment.position; eraser.transform.localPosition = new Vector3(0, 1, 0); eraser.transform.parent = palmAttachment; eraser.follow(palmAttachment); eraser.hideMesh(); }
internal void eraserDetach() { if (eraser != null) { eraser.follow(false); eraser.transform.position = Vector3.down; Destroy(eraser.gameObject); eraser = null; } }