This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Unlit/Billboard" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
} | |
SubShader | |
{ | |
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "DisableBatching" = "True" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
namespace com.hololabs.editor | |
{ | |
public class FindByGuid : EditorWindow | |
{ | |
[MenuItem("Utility/Find Asset by Guid %&g")] | |
public static void DoFindByGuidMenu() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 <keyj@emphy.de> | |
// using an algorithm description written by Alan Wolfe: | |
// https://blog.demofox.org/2019/06/25/generating-blue-noise-textures-with-void-and-cluster/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |