This commit is contained in:
Cameron 2024-04-09 16:40:10 -08:00 коммит произвёл GitHub
Родитель 07fe0453ce
Коммит 770ce149ec
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
5 изменённых файлов: 27 добавлений и 3 удалений

2
.gitignore поставляемый Normal file
Просмотреть файл

@ -0,0 +1,2 @@
# Visual Studio cache directory
.vs/

Просмотреть файл

@ -69,7 +69,7 @@ Custom profilers can be added to the bottom of the Visual Profiler by adding to
## Sample
A sample Unity project can be found in the *VisualProfilerUnityProject* folder. This project contains a simple sample scene that demonstrates the visual profiler being used in 3D and 2D (perspective and orthographic cameras) plus example profiler groups for C# behaviors, rendering, and physics.
A sample Unity project can be found in the *VisualProfilerUnityProject* folder. This project contains a simple sample scene that demonstrates the Visual Profiler being used in 3D and 2D (perspective and orthographic cameras) plus example profiler groups for C# behaviors, rendering, and physics.
![Sample](README/Images/Sample.png)

Просмотреть файл

@ -602,6 +602,7 @@ namespace Microsoft.MixedReality.Profiling
private bool instanceColorsDirty = false;
private bool instanceBaseColorsDirty = false;
private bool instanceUVOffsetScaleXDirty = false;
private bool customUpdateInUse = false;
/// <summary>
/// Reset any stats the profiler is tracking. Call this if you would like to restart tracking
@ -622,6 +623,19 @@ namespace Microsoft.MixedReality.Profiling
limitMemoryUsage = 0;
}
/// <summary>
/// Allows for an app to specific a custom point in the frame to call update. (Should be called once every frame.)
/// </summary>
public void CustomUpdate()
{
customUpdateInUse = true;
if (isActiveAndEnabled)
{
InternalUpdate();
}
}
private void OnEnable()
{
if (material == null)
@ -725,6 +739,14 @@ namespace Microsoft.MixedReality.Profiling
private void LateUpdate()
{
if (customUpdateInUse == false)
{
InternalUpdate();
}
}
private void InternalUpdate()
{
#if ENABLE_PROFILER
foreach (var profilerGroup in ProfilerGroups)
{

Просмотреть файл

@ -5,7 +5,7 @@ MonoImporter:
serializedVersion: 2
defaultReferences:
- material: {fileID: 2100000, guid: b98f8349d37aef742baaa038e99837c0, type: 2}
executionOrder: 1000
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:

Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "com.microsoft.mixedreality.visualprofiler",
"version": "3.6.0",
"version": "3.7.0",
"displayName": "Microsoft Mixed Reality Visual Profiler",
"description": "Provides a drop in solution for viewing your mixed reality Unity application's frame rate, scene complexity, and memory usage.",
"documentationUrl": "https://github.com/microsoft/VisualProfiler-Unity/blob/main/README.md",