-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: start/stop recording with keybinds
- Loading branch information
1 parent
f5ae5c4
commit cf06493
Showing
8 changed files
with
324 additions
and
8 deletions.
There are no files selected for viewing
223 changes: 223 additions & 0 deletions
223
Packages/deltaneverused.udonsharpprofiler/Runtime/ProfilerController.asset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,223 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} | ||
m_Name: ProfilerController | ||
m_EditorClassIdentifier: | ||
serializedUdonProgramAsset: {fileID: 11400000, guid: 4c51328dfe7798947a6ec392553fa46d, type: 2} | ||
udonAssembly: | ||
assemblyError: | ||
sourceCsScript: {fileID: 11500000, guid: fbecd1043e52c0c46a46dd6642136209, type: 3} | ||
scriptVersion: 2 | ||
compiledVersion: 2 | ||
behaviourSyncMode: 0 | ||
hasInteractEvent: 0 | ||
scriptID: 87726702791218209 | ||
serializationData: | ||
SerializedFormat: 2 | ||
SerializedBytes: | ||
ReferencedUnityObjects: [] | ||
SerializedBytesString: | ||
Prefab: {fileID: 0} | ||
PrefabModificationsReferencedUnityObjects: [] | ||
PrefabModifications: [] | ||
SerializationNodes: | ||
- Name: fieldDefinitions | ||
Entry: 7 | ||
Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, | ||
UdonSharp.Editor]], mscorlib | ||
- Name: comparer | ||
Entry: 7 | ||
Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, | ||
mscorlib]], mscorlib | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: | ||
Entry: 12 | ||
Data: 3 | ||
- Name: | ||
Entry: 7 | ||
Data: | ||
- Name: $k | ||
Entry: 1 | ||
Data: profiler | ||
- Name: $v | ||
Entry: 7 | ||
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor | ||
- Name: <Name>k__BackingField | ||
Entry: 1 | ||
Data: profiler | ||
- Name: <UserType>k__BackingField | ||
Entry: 7 | ||
Data: 3|System.RuntimeType, mscorlib | ||
- Name: | ||
Entry: 1 | ||
Data: UdonSharpProfiler.ProfilerDataReader, UdonSharpProfiler.Runtime | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: <SystemType>k__BackingField | ||
Entry: 7 | ||
Data: 4|System.RuntimeType, mscorlib | ||
- Name: | ||
Entry: 1 | ||
Data: VRC.Udon.UdonBehaviour, VRC.Udon | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: <SyncMode>k__BackingField | ||
Entry: 7 | ||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib | ||
- Name: | ||
Entry: 6 | ||
Data: | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: <IsSerialized>k__BackingField | ||
Entry: 5 | ||
Data: true | ||
- Name: _fieldAttributes | ||
Entry: 7 | ||
Data: 5|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib | ||
- Name: | ||
Entry: 12 | ||
Data: 0 | ||
- Name: | ||
Entry: 13 | ||
Data: | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: | ||
Entry: 7 | ||
Data: | ||
- Name: $k | ||
Entry: 1 | ||
Data: startRecording | ||
- Name: $v | ||
Entry: 7 | ||
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor | ||
- Name: <Name>k__BackingField | ||
Entry: 1 | ||
Data: startRecording | ||
- Name: <UserType>k__BackingField | ||
Entry: 7 | ||
Data: 7|System.RuntimeType, mscorlib | ||
- Name: | ||
Entry: 1 | ||
Data: UnityEngine.KeyCode, UnityEngine.CoreModule | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: <SystemType>k__BackingField | ||
Entry: 9 | ||
Data: 7 | ||
- Name: <SyncMode>k__BackingField | ||
Entry: 7 | ||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib | ||
- Name: | ||
Entry: 6 | ||
Data: | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: <IsSerialized>k__BackingField | ||
Entry: 5 | ||
Data: true | ||
- Name: _fieldAttributes | ||
Entry: 7 | ||
Data: 8|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib | ||
- Name: | ||
Entry: 12 | ||
Data: 1 | ||
- Name: | ||
Entry: 7 | ||
Data: 9|UnityEngine.HeaderAttribute, UnityEngine.CoreModule | ||
- Name: header | ||
Entry: 1 | ||
Data: Controls | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: | ||
Entry: 13 | ||
Data: | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: | ||
Entry: 7 | ||
Data: | ||
- Name: $k | ||
Entry: 1 | ||
Data: stopRecording | ||
- Name: $v | ||
Entry: 7 | ||
Data: 10|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor | ||
- Name: <Name>k__BackingField | ||
Entry: 1 | ||
Data: stopRecording | ||
- Name: <UserType>k__BackingField | ||
Entry: 9 | ||
Data: 7 | ||
- Name: <SystemType>k__BackingField | ||
Entry: 9 | ||
Data: 7 | ||
- Name: <SyncMode>k__BackingField | ||
Entry: 7 | ||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib | ||
- Name: | ||
Entry: 6 | ||
Data: | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: <IsSerialized>k__BackingField | ||
Entry: 5 | ||
Data: true | ||
- Name: _fieldAttributes | ||
Entry: 7 | ||
Data: 11|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib | ||
- Name: | ||
Entry: 12 | ||
Data: 0 | ||
- Name: | ||
Entry: 13 | ||
Data: | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: | ||
Entry: 8 | ||
Data: | ||
- Name: | ||
Entry: 13 | ||
Data: | ||
- Name: | ||
Entry: 8 | ||
Data: |
8 changes: 8 additions & 0 deletions
8
Packages/deltaneverused.udonsharpprofiler/Runtime/ProfilerController.asset.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
Packages/deltaneverused.udonsharpprofiler/Runtime/ProfilerController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using UdonSharp; | ||
using UnityEngine; | ||
|
||
namespace UdonSharpProfiler { | ||
public class ProfilerController : UdonSharpBehaviour { | ||
public ProfilerDataReader profiler; | ||
|
||
[Header("Controls")] | ||
public KeyCode startRecording = KeyCode.O; | ||
public KeyCode stopRecording = KeyCode.P; | ||
|
||
[DontUdonProfile] | ||
public void Update() { | ||
if (Input.GetKeyDown(startRecording)) | ||
profiler.recording = true; | ||
if (Input.GetKeyDown(stopRecording)) { | ||
profiler.recording = false; | ||
profiler.WriteEmitToLog(); | ||
} | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Packages/deltaneverused.udonsharpprofiler/Runtime/ProfilerController.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.