Skip to content

Instantly share code, notes, and snippets.

View Seneral's full-sized avatar

Seneral Seneral

View GitHub Profile
@Seneral
Seneral / GUIScaleUtility.cs
Last active May 5, 2023 05:46
Advanced GUI scaling for Unity. Fixes problems with unscaled clipping rect using reflection. Allows for custom zoom positions other than (0,0). Need all elements to offset by a specified value to account for zoom position and scale though. Example of use is my open source Node Editor Framework
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
using System.Reflection;
namespace NodeEditorFramework.Utilities
{
public static class GUIScaleUtility
@Seneral
Seneral / EditorLoadingControl.cs
Last active November 21, 2018 20:29
Extended editor callbacks for entering/leaving playmode and new scenes in Unity
#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;
#if UNITY_5_3_OR_NEWER || UNITY_5_3
using UnityEngine.SceneManagement;
using UnityEditor.SceneManagement;
#endif
using System;