Class InputRecordingService
Provides input recording into an internal buffer and exporting to files.
Implements
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Input
Assembly: cs.temp.dll.dll
Syntax
[MixedRealityDataProvider(typeof(IMixedRealityInputSystem), null, "Input Recording Service", "Profiles/DefaultMixedRealityInputRecordingProfile.asset", "MixedRealityToolkit.SDK")]
public class InputRecordingService : BaseInputDeviceManager, IMixedRealityInputRecordingService, IMixedRealityInputDeviceManager, IMixedRealityDataProvider, IMixedRealityService, IDisposable
Constructors
InputRecordingService(IMixedRealityServiceRegistrar, IMixedRealityInputSystem, String, UInt32, BaseMixedRealityProfile)
Constructor.
Declaration
public InputRecordingService(IMixedRealityServiceRegistrar registrar, IMixedRealityInputSystem inputSystem, string name = null, uint priority = 10U, BaseMixedRealityProfile profile = null)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityServiceRegistrar | registrar | The IMixedRealityServiceRegistrar instance that loaded the data provider. |
IMixedRealityInputSystem | inputSystem | The IMixedRealityInputSystem instance that receives data from this provider. |
String | name | Friendly name of the service. |
UInt32 | priority | Service priority. Used to determine order of instantiation. |
BaseMixedRealityProfile | profile | The service's configuration profile. |
Properties
InputRecordingProfile
Return the service profile and ensure that the type is correct.
Declaration
public MixedRealityInputRecordingProfile InputRecordingProfile { get; }
Property Value
Type | Description |
---|---|
MixedRealityInputRecordingProfile |
IsEnabled
Service has been enabled.
Declaration
public bool IsEnabled { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsRecording
True if input is being recorded.
Declaration
public bool IsRecording { get; }
Property Value
Type | Description |
---|---|
Boolean |
RecordingBufferTimeLimit
Maximum duration in seconds of the input recording if UseBufferTimeLimit is enabled.
Declaration
public float RecordingBufferTimeLimit { get; set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
If UseBufferTimeLimit is enabled then keyframes older than this limit will be discarded.
StartTime
Declaration
public float StartTime { get; }
Property Value
Type | Description |
---|---|
Single |
UseBufferTimeLimit
Limit the size of the recording buffer.
Declaration
public bool UseBufferTimeLimit { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
If recording is limited any input older than the RecordingBufferTimeLimit will be discarded.
Methods
Disable()
Optional Disable function to pause the service.
Declaration
public override void Disable()
Overrides
DiscardRecordedInput()
Discard all recorded input
Declaration
public void DiscardRecordedInput()
Enable()
Optional Enable function to enable / re-enable the service.
Declaration
public override void Enable()
Overrides
LateUpdate()
Optional LateUpdate function to that is called after Update has been called on all services.
Declaration
public override void LateUpdate()
Overrides
SaveInputAnimation(String)
Save recorded input animation to a file.
Declaration
public string SaveInputAnimation(string directory = null)
Parameters
Type | Name | Description |
---|---|---|
String | directory | Directory in which to create the file. If null the persistent data path of the app is used. |
Returns
Type | Description |
---|---|
String | File path where input has been recorded. |
Remarks
Filename is determined automatically.
SaveInputAnimation(String, String)
Save recorded input animation to a file.
Declaration
public string SaveInputAnimation(string filename, string directory = null)
Parameters
Type | Name | Description |
---|---|---|
String | filename | Name of the file to create. |
String | directory | Directory in which to create the file. If null the persistent data path of the app is used. |
Returns
Type | Description |
---|---|
String | File path where input has been recorded. |
StartRecording()
Start unlimited input recording.
Declaration
public void StartRecording()
StopRecording()
Stop recording input.
Declaration
public void StopRecording()
Events
OnRecordingStarted
Declaration
public event Action OnRecordingStarted
Event Type
Type | Description |
---|---|
Action |
OnRecordingStopped
Declaration
public event Action OnRecordingStopped
Event Type
Type | Description |
---|---|
Action |