// Start is called before the first frame update void Start() { ap = GetComponentInParent <AutomatedPlatform>(); id = ap.switchId; Debug.Log("ID: " + id); anim = GetComponent <Animator>(); GameEvents.current.onSwitchStateChanged += OnSwitchStateChange; }
private void OnEnable() { automatedPlatform = (AutomatedPlatform)target; selectionInfo = new SelectionInfo(); snapOn = false; }