Skip to content

Instantly share code, notes, and snippets.

View NeatWolf's full-sized avatar

NeatWolf NeatWolf

View GitHub Profile
@joshcamas
joshcamas / IsDirtyUtility.cs
Created March 18, 2019 14:44
Simple Utility script for Unity3D that allows access for "IsDirty" method for gameobjects.
using UnityEngine;
using UnityEditor;
using System.Reflection;
using System;
//Special thanks to Shamanim for solution
//https://forum.unity.com/threads/sorta-solved-check-if-gameobject-is-dirty.504894/#post-3967810
public class IsDirtyUtility
{
//Cached Value
@volblob
volblob / ScriptableObjectReload.cs
Created January 21, 2019 09:44
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;
@HAliss
HAliss / CurveDissolve.shader
Last active June 7, 2022 17:26
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
@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
@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
{
@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
@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()
{
@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" }
@bitinn
bitinn / .a-unity-git-config.md
Last active March 18, 2024 00:08
My Unity git config
@FullStackForger
FullStackForger / .gitignore
Last active April 6, 2024 13:19
.gitignore for Unity3d project
###
# Unity folders and files
###
[Aa]ssets/AssetStoreTools*
[Bb]uild/
[Ll]ibrary/
[Ll]ocal[Cc]ache/
[Oo]bj/
[Tt]emp/
[Uu]nityGenerated/