概要
using UnityEngine; using UnityEngine.Profiling; public class Example : MonoBehaviour { private void Update() { int num1 = 1; int num2 = 2; // ToString あり var sampler1 = CustomSampler.Create( "ToString あり" ); sampler1.Begin(); var str1 = $"{num1.ToString()} / {num1.ToString()}"; sampler1.End(); // ToString なし var sampler2 = CustomSampler.Create( "ToString なし" ); sampler2.Begin(); var str2 = $"{num1} / {num2}"; sampler2.End(); } }