Skip to content

Instantly share code, notes, and snippets.

@qwiboo
qwiboo / Blur.shader
Created May 25, 2025 00:22 — forked from alexanderameye/Blur.shader
Two-pass box blur shader
// Two-pass box blur shader created for URP 12 and Unity 2021.2
// Made by Alexander Ameye
// https://alexanderameye.github.io/
Shader "Hidden/Blur"
{
Properties
{
_MainTex ("Texture", 2D) = "white"
}
@qwiboo
qwiboo / recalculate-normals.cs
Created February 28, 2024 04:29 — forked from unitycoder/recalculate-normals.cs
Unity Recalculate Normals
/*
* The following code was taken from: http://schemingdeveloper.com
*
* Visit our game studio website: http://stopthegnomes.com
*
* License: You may use this code however you see fit, as long as you include this notice
* without any modifications.
*
* You may not publish a paid asset on Unity store if its main function is based on
* the following code, but you may publish a paid asset that uses this code.
@qwiboo
qwiboo / AutoMaskHumanoidRigsProcessor.cs
Created August 30, 2023 03:28 — forked from Invertex/AutoMaskHumanoidRigsProcessor.cs
Automatically creates and applies a full mask to all clips in a Humanoid rig so that all parts of the animation are maintained.
using UnityEngine;
using UnityEditor;
using System.Linq;
namespace Invertex.Unity.Editor.Importing
{
/// <summary>
/// This script will automatically generate an AvatarMask that will enable a Humanoid animation to animate all parts of your asset.
/// It will assign it to every clip in a new asset or every existing clip on an asset.
/// USAGE: Place in an "Editor" folder somewhere in your assets.
@qwiboo
qwiboo / CornerCheat.cs
Created July 5, 2021 00:00 — forked from grapefrukt/CornerCheat.cs
Makes a CircleCollider2D slide smoothly along the inner edge of a rounded EdgeCollider2D
using UnityEngine;
public class CornerCheat : MonoBehaviour {
public CircleCollider2D circle;
public Rigidbody2D body;
EdgeCollider2D edge;
[Range(0, .2f)] public float distanceThreshold = .03f;
[Range(0, 1)] public float dotThreshold = .96f;
@qwiboo
qwiboo / Global.cs
Created November 23, 2018 01:26
Simple class to handle the MoveTaskToBack of android system in Unity game engine
using UnityEngine;
public static class Global
{
public static void MoveTaskToBack()
{
if (Application.platform == RuntimePlatform.Android)
{
AndroidJavaObject activity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity");
activity.Call<bool>("moveTaskToBack", true);