Skip to content

Instantly share code, notes, and snippets.

View allfake's full-sized avatar

nut allfake

  • opendream
View GitHub Profile
@jhocking
jhocking / TintedUIBlur.shader
Created February 9, 2021 16:17
Blur the background behind UI
// blur shader from https://stackoverflow.com/questions/29030321/unity3d-blur-the-background-of-a-ui-canvas
// added toggle https://forum.unity.com/threads/shader-properties-no-bool-support.157580/#post-3013337
Shader "Custom/TintedUIBlur" {
Properties {
_Size("Blur", Range(0, 30)) = 3
[HideInInspector] _MainTex("Masking Texture", 2D) = "white" {}
_AdditiveColor("Additive Tint color", Color) = (0, 0, 0, 0)
_MultiplyColor("Multiply Tint color", Color) = (1, 1, 1, 1)
[Toggle(MAKE_DESATURATED)] _MakeDesaturated ("Desaturate", Float) = 0
@scriptingosx
scriptingosx / pkgAndNotarize.sh
Created September 10, 2019 12:46
Script that builds, packages and notarizes an Xcode command line tool.
#!/bin/zsh
# pkgAndNotarize.sh
# 2019 - Armin Briegel - Scripting OS X
# place a copy of this script in in the project folder
# when run it will build for installation,
# create a pkg from the product,
# upload the pkg for notarization and monitor the notarization status
@XakazukinX
XakazukinX / BlendShapeAnimationExpoter.cs
Created May 15, 2019 16:52
VRMBlendShapeProxyからAnimationClipをはくやつ
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using VRM;
public class BlendShapeAnimationExpoter : EditorWindow
{
//対象のVRMBlendShapeProxy
public VRMBlendShapeProxy proxy;
public string savePath;
@bruno-garcia
bruno-garcia / link.xml
Created October 8, 2018 14:39
link.xml for Unity IL2CPP to work with Newtonsoft.Json (Tested with the Sentry SDK https://github.com/getsentry/sentry-dotnet)
@jhincapie
jhincapie / Util.KeyCodes.cs
Last active June 1, 2024 01:19
Mapping between Windows API virtual keyboard keyCodes and Unity KeyCode enum
using System.Collections.Generic;
using UnityEngine;
namespace Util
{
public class KeyCodes
{
public const int VK_ABNT_C1 = 0xC1;// Abnt C1
public const int VK_ABNT_C2 = 0xC2;// Abnt C2
public const int VK_ADD = 0x6B;// Numpad +
#if UNITY_EDITOR
var mockLoginDialog = GameObject.FindObjectOfType<Facebook.Unity.Editor.Dialogs.MockLoginDialog>();
if (mockLoginDialog != null) {
typeof(Facebook.Unity.Editor.Dialogs.MockLoginDialog).GetField("accessToken", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).SetValue(mockLoginDialog, "your_access_token");
typeof(Facebook.Unity.Editor.Dialogs.MockLoginDialog).GetMethod("SendSuccessResult", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).Invoke(mockLoginDialog, null);
MonoBehaviour.Destroy(mockLoginDialog);
}
#endif
@thorikawa
thorikawa / japanese.txt
Last active March 8, 2022 00:07
日本語の文字コード範囲指定(ascii・ひらがな・カタカナ・頻出漢字)
32-128,12288-12543,12448-12543,65280-65519,19968,19971,19977,19978,19979,20013,20061,20108,20116,20154,20241,20808,20837,20843,20845,20870,20986,21147,21313,21315,21475,21491,21517,22235,22303,22805,22823,22825,22899,23376,23383,23398,23567,23665,24029,24038,24180,25163,25991,26085,26089,26376,26408,26412,26449,26519,26657,26862,27491,27671,27700,28779,29356,29577,29579,29983,30000,30007,30010,30333,30334,30446,30707,31354,31435,31481,31992,32819,33457,33609,34411,35211,35997,36196,36275,36554,37329,38632,38738,38899,19975,20024,20132,20140,20170,20250,20307,20309,20316,20803,20804,20809,20844,20869,20908,20992,20998,20999,21069,21271,21320,21322,21335,21407,21451,21476,21488,21512,21516,22238,22259,22269,22290,22320,22580,22768,22770,22799,22806,22810,22812,22826,22969,22985,23460,23478,23546,23569,23721,24037,24066,24112,24195,24215,24339,24341,24351,24369,24375,24403,24418,24460,24515,24605,25144,25165,25945,25968,26032,26041,26126,26143,26149,26172,26178,26228,26332,26360,26397,26469,26481,27005,27468,274
@waldobronchart
waldobronchart / UnityPlatformSwitcher.cs
Last active October 12, 2023 09:13
A simple fast platform switcher for Unity
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.IO;
public class PlatformSwitcher
{
[MenuItem("Platform/PC, Mac and Linux Standalone")]
static void SwitchPlatformToDesktop()
{
@adekbadek
adekbadek / showedgecollider.cs
Last active December 30, 2023 19:02
Show 2D Edge Collider as Gizmo, also in Edit Mode
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class visibleCollider : MonoBehaviour {
// The Collider itself
private EdgeCollider2D thisCollider;
// array of collider points
private Vector2[] points;
@thebeardphantom
thebeardphantom / ZeroAll.cs
Last active December 4, 2023 07:51
A quick way to reset transforms in Unity3D!
using UnityEngine;
using System.Collections;
using UnityEditor;
namespace BSGTools {
namespace EditorUtilities {
public class ZeroAll : Editor {
[MenuItem("GameObject/Reset/Zero All %&a")]
static void ResetAll() {
GameObject[] selection = Selection.gameObjects;