Skip to content

Instantly share code, notes, and snippets.

View NeatWolf's full-sized avatar

NeatWolf NeatWolf

View GitHub Profile
@bpesquet
bpesquet / .gitattributes-lfs-unity
Last active December 7, 2022 22:37
.gitattributes file for LFS with Unity
* text=auto
# Unity files
*.meta -text -merge=unityamlmerge
*.unity -text -merge=unityamlmerge
*.asset -text -merge=unityamlmerge
*.prefab -text -merge=unityamlmerge
# Image formats
*.psd filter=lfs diff=lfs merge=lfs -text
@ditzel
ditzel / KdTree.cs
Last active April 29, 2024 21:38
k-d Tree
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Profiling;
public class KdTree<T> : IEnumerable<T>, IEnumerable where T : Component
{
protected KdNode _root;
protected KdNode _last;
@FullStackForger
FullStackForger / .gitattributes
Last active July 5, 2023 17:59 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
# Unity
*.cginc text
*.cs diff=csharp text
*.shader text
# Unity YAML
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@kaiware007
kaiware007 / billboard.shader
Created January 19, 2018 09:28
Simple Billboard shader for Unity
Shader "Unlit/Billboard"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "DisableBatching" = "True" }
@reunono
reunono / CinemachineCameraShaker.cs
Last active January 16, 2023 07:51
Cinemachine camera shake
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Add this component to your Cinemachine Virtual Camera to have it shake when calling its ShakeCamera methods.
/// </summary>
public class CinemachineCameraShaker : MonoBehaviour
{
@partlyhuman
partlyhuman / FindByGuid.cs
Last active November 21, 2023 14:53
Unity Find by GUID
using UnityEditor;
using UnityEngine;
namespace com.hololabs.editor
{
public class FindByGuid : EditorWindow
{
[MenuItem("Utility/Find Asset by Guid %&g")]
public static void DoFindByGuidMenu()
{
@ldez
ldez / gmail-github-filters.md
Last active April 3, 2024 11:53
Gmail and GitHub - Filters

Gmail and GitHub

How to filter emails from GitHub in Gmail and flag them with labels.

The labels in this document are just examples.

Pull Request

Filter Label
@TobiTobascoNollero
TobiTobascoNollero / UIParticleScaler.cs
Last active April 19, 2021 22:14
Unity - Particle Scaling for Particles inside the Unity GUI
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
/* UI Particle Scaling script by Tobi Tobasco Nollero, questions: tobias@lostmountaingames.com, http://tobiasnoller.com/
* Just drag this script on any canvas which has child particle systems underneath.
* Add your resolution change listener to scale your particles when changing resolutions.
* Prewarmed particle system emitting on begin play, will probably not be affected by the script the first time they fire.
* Feel free to use this script in any project.
// Unity C# Cheat Sheet
// I made these examples for students with prior exerience working with C# and Unity.
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting
@shayded-exe
shayded-exe / ScriptableObjectPropertyDrawer.cs
Last active September 4, 2020 15:12
Put this script in your Editor folder. Then right click on any inspector field that accepts a ScriptableObject to create an asset for it. The asset will also automatically be assigned to the field.
using System;
using System.IO;
using System.Linq;
using System.Linq.Extensions;
using UnityEditor;
using UnityEngine;
namespace PachowStudios.BadTummyBunny.Editor
{
[CustomPropertyDrawer(typeof(ScriptableObject), true)]