private void Awake() { line = GetComponent <LineRenderer>(); laserSelector = GetComponent <LaserSelector>(); laserSelector.onChangedHandlingModule.AddListener(Initialize); line.SetPosition(1, Vector3.forward * laserSelector.MaxDistance); line.enabled = false; }
public InputModuleSelectorManager(GameObject deviceObject, IInputDevice inputDevice) { collisionSelector = deviceObject.AddComponent <CollisionSelector>(); laserSelector = deviceObject.AddComponent <LaserSelector>(); collisionSelector.onSelect.AddListener(inputDevice.HapticPulse); laserSelector.onSelect.AddListener(inputDevice.HapticPulse); deviceObject.AddComponent <LaserAppearanceManager>(); CurrentSelector = collisionSelector; laserSelector.enabled = false; }