検証結果

検証用スクリプト
using UnityEngine; using UnityEngine.Profiling; public class Example : MonoBehaviour { private void Update() { const string path = "Assets\\material.mat"; const int count = 100000; Profiler.BeginSample( "\"" ); for ( var i = 0; i < count; i++ ) { _ = path.Replace( "\\", "/" ); } Profiler.EndSample(); Profiler.BeginSample( "\'" ); for ( var i = 0; i < count; i++ ) { _ = path.Replace( '\\', '/' ); } Profiler.EndSample(); } }