Skip to content

Instantly share code, notes, and snippets.

View sdelrue's full-sized avatar
💭
coding

Steven Delrue sdelrue

💭
coding
View GitHub Profile
public class FGlowShader : FShader
{
private float _glowAmount;
private Color _glowColor;
public FGlowShader(float glowAmount,Color glowColor) : base("GlowShader", Shader.Find("Futile/Glow"))
{
_glowAmount = glowAmount;
_glowColor = glowColor;
needsApply = true;
@sdelrue
sdelrue / Minimize.cs
Last active May 16, 2024 06:26
This minizes the Unity window (Editor or Build) from code. Only tested on windows.
using UnityEngine;
using System.Runtime.InteropServices;
public class Minimize : MonoBehaviour {
private void OnMimize() {
ShowWindow(GetActiveWindow(), 2);
}
[DllImport("user32.dll")]
private static extern bool ShowWindow(IntPtr hwnd, int nCmdShow);