Exemplo n.º 1
0
        public static WindowBase CreateWindow <T>(object target) where T : WindowBase
        {
            var window = Activator.CreateInstance <T>();

            window.Target   = target;
            window.windowID = WindowManager.NextWindowID();
            window.m_rect   = WindowManager.GetNewWindowRect();

            WindowManager.Windows.Add(window);

            window.Init();

            return(window);
        }
Exemplo n.º 2
0
        public static StaticInspector CreateWindowStatic(Type type)
        {
            var window = new StaticInspector
            {
                TargetType = type,
                windowID   = WindowManager.NextWindowID(),
                m_rect     = WindowManager.GetNewWindowRect()
            };

            WindowManager.Windows.Add(window);

            window.Init();

            return(window);
        }
Exemplo n.º 3
0
        public static WindowBase CreateWindow <T>(object target) where T : WindowBase
        {
            var window = Activator.CreateInstance <T>();

#if CPP
            if (target is Il2CppSystem.Object ilObject)
            {
                target = ilObject.Il2CppCast(ReflectionHelpers.GetActualType(ilObject));
            }
#endif

            window.Target = target;

            window.windowID = WindowManager.NextWindowID();
            window.m_rect   = WindowManager.GetNewWindowRect();

            WindowManager.Windows.Add(window);

            window.Init();

            return(window);
        }