Skip to content

Instantly share code, notes, and snippets.

View NeatWolf's full-sized avatar

NeatWolf NeatWolf

View GitHub Profile
@NeatWolf
NeatWolf / ScriptableObjectReload.cs
Created April 21, 2019 10:14 — forked from volblob/ScriptableObjectReload.cs
Code to illustrate new reloading of ScriptableObject in Unity 2019.1
using System.IO;
using UnityEngine;
using UnityEditor;
// Save this to a file named ScriptableObjectReload.cs and run this example with menu item "Examples" -> "Reload ScriptableObject Example"
public class ScriptableObjectReload : ScriptableObject
{
const string assetPath = "Assets/ScriptObject.asset";
public string stringValue;
@NeatWolf
NeatWolf / gmail-github-filters.md
Created May 1, 2019 13:14 — forked from ldez/gmail-github-filters.md
Gmail and GitHub - Filters

Gmail and GitHub

Create new filters and create new labels.

Pull Request

from:([email protected]) AND {"Patch Links" "approved this pull request." "requested changes on this pull request." "commented on this pull request." "pushed 1 commit." "pushed 2 commits." "pushed 3 commits."}

label: gh-pull-request

@NeatWolf
NeatWolf / bluenoise.c
Created June 27, 2019 10:39 — forked from kajott/bluenoise.c
Blue Noise texture generation using the void-and-cluster algorithm
#if 0 // self-compiling code
gcc -std=c99 -Wall -Wextra -pedantic -Werror -g -O4 -march=native $0 -lm || exit 1
exec time ./a.out
#endif
// Blue Noise texture generation using the void-and-cluster algorithm
// implemented by Martin Fiedler <[email protected]>
// using an algorithm description written by Alan Wolfe:
// https://blog.demofox.org/2019/06/25/generating-blue-noise-textures-with-void-and-cluster/
@NeatWolf
NeatWolf / billboard.shader
Created August 5, 2019 14:52 — forked from kaiware007/billboard.shader
Simple Billboard shader for Unity
Shader "Unlit/Billboard"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "DisableBatching" = "True" }
@NeatWolf
NeatWolf / CurveDissolve.shader
Created August 17, 2019 11:27 — forked from HAliss/CurveDissolve.shader
Creates a monochromatic texture with color values from a given animation curve
Shader "Custom/CurveDissolve"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Noise("Noise", 2D) = "white" {}
_CurveTexture("Curve texture", 2D) = "white" {}
_Cutoff("Cutoff", Range(0,1)) = 0
_Glossiness ("Smoothness", Range(0,1)) = 0.5
@NeatWolf
NeatWolf / ReplaceMaterials.cs
Created September 8, 2019 15:45 — forked from TocaLucas/ReplaceMaterials.cs
Unity3D Material Replace Editor
using UnityEngine;
using UnityEditor;
public class ReplaceMaterials : EditorWindow {
static int goCount = 0, replaceCount = 0;
private Material currentMaterial = null;
private Material replaceMaterial = null;
[MenuItem("Stuff/Replace Materials")]
public static void ShowWindow() {
EditorWindow.GetWindow(typeof(ReplaceMaterials));
@NeatWolf
NeatWolf / KdTree.cs
Created October 1, 2019 20:21 — forked from ditzel/KdTree.cs
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;
@NeatWolf
NeatWolf / MeshDestroy.cs
Created October 1, 2019 20:22 — forked from ditzel/MeshDestroy.cs
MeshDestroy => Put it on a game object with a mesh filter and renderer. Make sure to have read/write enabled on fbx import
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MeshDestroy : MonoBehaviour
{
private bool edgeSet = false;
private Vector3 edgeVertex = Vector3.zero;
private Vector2 edgeUV = Vector2.zero;
@NeatWolf
NeatWolf / .gitattributes-lfs-unity
Created November 8, 2019 22:11 — forked from bpesquet/.gitattributes-lfs-unity
.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
@NeatWolf
NeatWolf / .gitattributes
Created November 8, 2019 22:21 — forked from FullStackForger/.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