Class ProximitySensor
Input device representing the proximity of the device playing the content to the user.
Inherited Members
Namespace: UnityEngine.InputSystem
Syntax
public class ProximitySensor : Sensor
Remarks
The proximity sensor is usually used by phones to determine if the user is holding the phone to their ear or not.
Properties
current
Declaration
public static ProximitySensor current { get; }
Property Value
Type | Description |
---|---|
ProximitySensor |
distance
Proximity sensor distance measured in centimeters.
Declaration
public AxisControl distance { get; }
Property Value
Type | Description |
---|---|
AxisControl |
Methods
FinishSetup()
Declaration
protected override void FinishSetup()
Overrides
MakeCurrent()
Declaration
public override void MakeCurrent()
Overrides
OnRemoved()
Declaration
protected override void OnRemoved()