2025-03-06から1日間の記事一覧
概要 using System; using System.Reflection; using UnityEditor; internal static class Example { [MenuItem( "Tools/Run" )] private static void Run() { const BindingFlags bindingAttrs = BindingFlags.Instance | BindingFlags.NonPublic; var game…
概要 破棄していないインスタンスがわかるようになる。 参考サイト様
ソースコード #if UNITY_EDITOR using System; using UnityEditor; namespace Kogane { public struct SetPlayModeWindowCustomRenderingResolutionScope : IDisposable { private readonly uint m_width; private readonly uint m_height; private bool m_i…
ソースコード #if UNITY_EDITOR using System; using System.Reflection; using UnityEditor; namespace Kogane { public struct SetGameViewSelectedSizeIndexScope : IDisposable { private const BindingFlags BINDING_ATTRS = BindingFlags.Instance | B…
概要 const BindingFlags bindingAttrs = BindingFlags.Instance | BindingFlags.Public; var gameViewType = Type.GetType( "UnityEditor.GameView,UnityEditor" ); var selectedSizeIndexInfo = gameViewType!.GetProperty( "selectedSizeIndex", bindingA…
ソースコード #if UNITY_EDITOR using System; using System.Reflection; using UnityEditor; using UnityEngine; namespace Kogane { public struct SetGameViewZoomAreaScaleScope : IDisposable { private const BindingFlags BINDING_ATTRS = BindingFla…
ソースコード #if UNITY_EDITOR using System; using UnityEditor; namespace Kogane { public struct SetGameViewMaximizedScope : IDisposable { private static readonly Type GAME_VIEW_TYPE = Type.GetType( "UnityEditor.GameView,UnityEditor" ); pri…