概要
using UnityEditor; using UnityEditorInternal; using UnityEngine; public class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var invalidPath = @"\ピ/カ:チ*ュ?ウ"".<t>x|t"; var path = InternalEditorUtility.RemoveInvalidCharsFromFileName( invalidPath, false ); // ピカチュウ.txt Debug.Log( path ); } }