Skip to content

Instantly share code, notes, and snippets.

@sfider
sfider / CreateGameObjectHierarchyPositionFix.cs
Last active April 16, 2022 13:23
Unity fix for positioning newly created objects in hierarchy below selected object, not at the end of the hierarchy
/*
* Copyright 2022 Marcin Swiderski
*
* The MIT Licence (MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@totallyRonja
totallyRonja / MaterialGradientDrawer.cs
Last active September 26, 2023 09:46
A Material Property Drawer for the [Gradient] attribute which lets you edit gradients and adds them to the shader as textures. More information here: https://twitter.com/totallyRonja/status/1368704187580682240
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
public class MaterialGradientDrawer : MaterialPropertyDrawer {
private int resolution;
@MattRix
MattRix / CurvatureImageEffect.shader
Last active February 2, 2024 20:15
Cavity/Curvature image effect shader based on the Blender node graph in this post: https://blender.community/c/rightclickselect/J9bbbc/
Shader "Milkbag/CurvatureImageEffect"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_LightStrength ("LightStrength", Float) = 0.3
_DarkStrength ("DarkStrength", Float) = 0.3
_Spread ("Spread", Float) = 1.0
[Toggle(USE_MULTIPLY)] _UseMultiply("Use Multiply", Float) = 0
[Toggle(CURVATURE_ONLY)] _CurvatureOnly("Curvature Only", Float) = 0
@Didacvs
Didacvs / README.MD
Created May 5, 2020 01:37 — forked from nzec/README.MD
DeezLoader Offical Page

Thanks to /u/zpoo32 for reporting several issues in this list!

Deezloader Remix

(Recommended)

Available for macOS, Linux, Windows.

@dpid
dpid / how-to-notarize-unity-for-macos.md
Last active December 6, 2023 20:42
How to notarize a Unity build for MacOs 10.15 Catalina

How to notarize a Unity build for macOs 10.15 Catalina

As of January 2020, all apps running on macOs 10.15 Catalina are required to be notarized. For Unity games distributed outside the Mac App Store, such as with Steam, the notarization process is done post build using a series of Xcode command line tools.

Prerequisites

  • a Mac that is compatible with macOs 10.15 Catalina :
    • MacBook (2015 or newer)
    • MacBook Air (2012 or newer)
  • MacBook Pro (2012 or newer)
/*
** Buggy-Mouse.ahk - Fix a buggy mouse. Stop it from double-clicking when you try to single-click.
**
** NOTE: Please use this URL when linking to Buggy Mouse: r.secsrv.net/AutoHotkey/Scripts/Buggy-Mouse
**
** Updated: Thu, Nov 1, 2012 --- 11/1/12, 10:19:19am EDT
** Location: r.secsrv.net/AutoHotkey/Scripts/Buggy-Mouse
**
** Keywords: mouse double clicks when I click once
** Keywords: mouse double clicks when I single click
@phosphoer
phosphoer / ControllerIconMapDefinition.cs
Last active June 8, 2023 09:33
Rewired Glyph Mappings
using UnityEngine;
using System.Collections.Generic;
[CreateAssetMenu(fileName = "new-controller-icon-mapping", menuName = "Controller Icon Mapping")]
public class ControllerIconMapDefinition : ScriptableObject
{
[SerializeField]
private InputIconMapDefinition gamepadMap = null;
[SerializeField]
@LotteMakesStuff
LotteMakesStuff / AutohookAttribute.cs
Last active January 2, 2024 13:54
[Autohook] property drawer for unity - Add this [Autohook] attribute to a property to and the inspector will automagically hook up a valid reference for you if it can find a component attached to the same game object that matches the field you put it on. You can watch a demo of this in action here https://youtu.be/faVt09NGzws <3
// NOTE DONT put in an editor folder!
using UnityEngine;
public class AutohookAttribute : PropertyAttribute
{
}
@randalfien
randalfien / MarkUnused.cs
Last active October 24, 2022 09:51
Unity Mark Unused Assets
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEditor;
using UnityEngine;
public class MarkUnused
{
private const string UnusedLabel = "Unused"; // All unused assets will be tagged with this label
@sirkuttin
sirkuttin / GitKrakenMeldWindows10.md
Last active November 20, 2023 16:57
Gitkraken can use the Git Config Default merge and diff tool. This allows you to right click a file and "open external diff tool". I like meld the best for this. This works for git command line and should work for more than just GitKraken.

First, Download and install the newest version of Meld for Windows. https://download.gnome.org/binaries/win32/meld/

Next we need to edit your .gitconfig file. This file lives as a hidden file in your user directory. Here is a sample of mine:

[user]
	email = me@email.com
	name = Sir Kuttin
[merge]