Unity 6.3
0 онлайн 82 гостей 3 в системе
Вход

PIX.IsAttached

Declaration

public static bool IsAttached();

Описание

Возвращает true при запуске через PIX и в сборке для разработки.

using UnityEngine;
using UnityEngine.Rendering;

public class PixControl : MonoBehaviour { public int frameCaptureCount = 1;

int frameCount = 0; bool capturing = false;

void Awake() { if (PIX.IsAttached()) { PIX.BeginGPUCapture(); capturing = true; } }

void Update() { if (frameCount > frameCaptureCount && capturing) { PIX.EndGPUCapture(); capturing = false; }

frameCount++; } }