Class SubjectBehavior
Inheritance
Inherited Members
Namespace: RecordAndPlay.Record
Assembly: RecordAndPlay.dll
Syntax
public class SubjectBehavior : MonoBehaviour
Methods
Build(GameObject, Recorder)
Builds a SubjectBehavior and it's corrresponding SubjectRecorder and attatches itself to the gameobject passed in.
Declaration
public static SubjectBehavior Build(GameObject subject, Recorder recorder)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.GameObject | subject | The gameobject to record. |
Recorder | recorder | The recorder that is incharge of all subjects. |
Returns
Type | Description |
---|---|
SubjectBehavior | The subject behavior that's been attatched to the gameobject passed in. |
Build(GameObject, Recorder, Int32, Single)
Builds a SubjectBehavior and it's corrresponding SubjectRecorder and attatches itself to the gameobject passed in.
Declaration
public static SubjectBehavior Build(GameObject subject, Recorder recorder, int frameRate, float minimumDelta)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.GameObject | subject | The gameobject to record. |
Recorder | recorder | The recorder that is incharge of all subjects. |
System.Int32 | frameRate | How many times a second the recorder will observe the position and rotation of the subject. |
System.Single | minimumDelta | How much the position or rotation must change before it's considered moved. |
Returns
Type | Description |
---|---|
SubjectBehavior | The subject behavior that's been attatched to the gameobject passed in. |
Build(GameObject, Recorder, Int32, String, Dictionary<String, String>, Single)
Builds a SubjectBehavior and it's corrresponding SubjectRecorder and attatches itself to the gameobject passed in.
Declaration
public static SubjectBehavior Build(GameObject subject, Recorder recorder, int frameRate, string name, Dictionary<string, string> metadata, float minimumDelta)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.GameObject | subject | The gameobject to record. |
Recorder | recorder | The recorder that is incharge of all subjects. |
System.Int32 | frameRate | How many times a second the recorder will observe the position and rotation of the subject. |
System.String | name | The name of the subject to be used when saved to file. |
System.Collections.Generic.Dictionary<System.String, System.String> | metadata | Any starting metadata on the specific subject. |
System.Single | minimumDelta | How much the position or rotation must change before it's considered moved. |
Returns
Type | Description |
---|---|
SubjectBehavior | The subject behavior that's been attatched to the gameobject passed in. |
Build(GameObject, Recorder, String)
Builds a SubjectBehavior and it's corrresponding SubjectRecorder and attatches itself to the gameobject passed in.
Declaration
public static SubjectBehavior Build(GameObject subject, Recorder recorder, string name)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.GameObject | subject | The gameobject to record. |
Recorder | recorder | The recorder that is incharge of all subjects. |
System.String | name | The name of the subject to be used when saved to file. |
Returns
Type | Description |
---|---|
SubjectBehavior | The subject behavior that's been attatched to the gameobject passed in. |
Build(GameObject, Recorder, String, Dictionary<String, String>)
Builds a SubjectBehavior and it's corrresponding SubjectRecorder and attatches itself to the gameobject passed in.
Declaration
public static SubjectBehavior Build(GameObject subject, Recorder recorder, string name, Dictionary<string, string> metadata)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.GameObject | subject | The gameobject to record. |
Recorder | recorder | The recorder that is incharge of all subjects. |
System.String | name | The name of the subject to be used when saved to file. |
System.Collections.Generic.Dictionary<System.String, System.String> | metadata | Any starting metadata on the specific subject. |
Returns
Type | Description |
---|---|
SubjectBehavior | The subject behavior that's been attatched to the gameobject passed in. |
CaptureCustomEvent(String, Dictionary<String, String>)
If you want to keep up with something special that occured at a certain time in your recording, then you can call this function with the details of the special event.
Declaration
public void CaptureCustomEvent(string name, Dictionary<string, string> contents)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the event. |
System.Collections.Generic.Dictionary<System.String, System.String> | contents | Details of the event. |
CaptureCustomEvent(String, String)
If you want to keep up with something special that occured at a certain time in your recording, then you can call this function with the details of the special event.
Declaration
public void CaptureCustomEvent(string name, string contents)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the event. |
System.String | contents | Details of the event. |
GetFPS()
How many times the recorder takes snapshots of the state of the subject while recording.
Declaration
public float GetFPS()
Returns
Type | Description |
---|---|
System.Single | How many times a second the state is captured. |
GetSubjectRecorder()
The recorder that the subject specifically uses for recording orientations and lifecycle events.
Declaration
public SubjectRecorder GetSubjectRecorder()
Returns
Type | Description |
---|---|
SubjectRecorder | The recorder. |
SetMetaData(String, String)
Keep up with custom data associated with the subject.
Declaration
public void SetMetaData(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Name of the custom data. |
System.String | value | Details of the custom data. |