コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

2023-03-15から1日間の記事一覧

【Unity】文字列が変数名に使用できるか確認する方法

概要 using System.CodeDom.Compiler; using UnityEditor; using UnityEngine; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var provider = CodeDomProvider.CreateProvider( "C#" ); Debug.Log( provider.IsVa…