概要
using UnityEditor; using UnityEngine; public class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var playerSettings = Unsupported.GetSerializedAssetInterfaceSingleton( "PlayerSettings" ) as PlayerSettings; Debug.Log( playerSettings ); } }
Unsupported.GetSerializedAssetInterfaceSingleton を使用すると
PlayerSettings のようなシングルトンなアセットの参照を取得できます