Class CustomEventCapture
An event that acts as a key value pair with an associated timestamp.
Implements
Inherited Members
Namespace: RecordAndPlay
Assembly: RecordAndPlay.dll
Syntax
[Serializable]
public class CustomEventCapture : Capture, ISerializationCallbackReceiver
Constructors
CustomEventCapture(Single, String, Dictionary<String, String>)
Create a new custom event capture.
Declaration
public CustomEventCapture(float time, string name, Dictionary<string, string> contentData)
Parameters
Type | Name | Description |
---|---|---|
System.Single | time | The time the event occured in the recording. |
System.String | name | The name of the event. |
System.Collections.Generic.Dictionary<System.String, System.String> | contentData |
CustomEventCapture(Single, String, String)
Create a new custom event capture. Initializes a dictionary with a single entry that is "value" => contents
Declaration
public CustomEventCapture(float time, string name, string contents)
Parameters
Type | Name | Description |
---|---|---|
System.Single | time | The time the event occured in the recording. |
System.String | name | The name of the event. |
System.String | contents | The details of the event that occured. |
Properties
Contents
The details of the event
Declaration
public Dictionary<string, string> Contents { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.String> |
Name
The name of the event
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
OnAfterDeserialize()
Used for custom Unity serialization. Do not call this method.
Declaration
public void OnAfterDeserialize()
OnBeforeSerialize()
Used for custom Unity serialization. Do not call this method.
Declaration
public void OnBeforeSerialize()
SetTime(Single)
Creates a new CustomEventCapture with the same name and details but with a modified time, leaving the original event unchanged.
Declaration
public override Capture SetTime(float newTime)
Parameters
Type | Name | Description |
---|---|---|
System.Single | newTime | The new time the event occured in the recording. |
Returns
Type | Description |
---|---|
Capture | A entirely new capture that occured with the time passed in. |
Overrides
ToCSV()
Builds a string that represents a single row in a csv file that contains this object's data.
Declaration
public override string ToCSV()
Returns
Type | Description |
---|---|
System.String | A row of csv data as a string. |
Overrides
ToJSON()
Builds a JSON string that represents the CustomEventCapture object.
Declaration
public override string ToJSON()
Returns
Type | Description |
---|---|
System.String | A JSON string. |