This file contains hidden or 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.Reflection; | |
| using UnityEngine; | |
| using UnityEngine.Rendering; | |
| using UnityEngine.Rendering.Universal; | |
| using ShadowResolution = UnityEngine.Rendering.Universal.ShadowResolution; | |
| /// <summary> | |
| /// Enables getting/setting URP graphics settings properties that don't have built-in getters and setters. |
This file contains hidden or 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/StencilMask" { | |
| Properties { | |
| _StencilMask("Stencil mask", Int) = 0 | |
| } | |
| SubShader { | |
| Tags { | |
| "RenderType" = "Opaque" | |
| "Queue" = "Geometry-100" | |
| } |
This file contains hidden or 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 "Tri-Planar World" { | |
| Properties { | |
| _Side("Side", 2D) = "white" {} | |
| _Top("Top", 2D) = "white" {} | |
| _Bottom("Bottom", 2D) = "white" {} | |
| _SideScale("Side Scale", Float) = 2 | |
| _TopScale("Top Scale", Float) = 2 | |
| _BottomScale ("Bottom Scale", Float) = 2 | |
| } | |
This file contains hidden or 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 UNITY_EDITOR | |
| using UnityEditor; | |
| using UnityEditor.Callbacks; | |
| #endif | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using UnityEngine; | |
| using S = UnityEngine.SerializeField; |
This file contains hidden or 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; | |
| // @kurtdekker | |
| // | |
| // Place on a MeshFilter / MeshRenderer GameObject. | |
| // | |
| // This will: | |
| // - duplicate the entire GameObject via Instantiate | |
| // (and obviously its children; those are ignored!) | |
| // - parent it to the same place the original was |
This file contains hidden or 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; | |
| // @kurtdekker - quick double-siding mechanism. | |
| // | |
| // Place or add this Component to things with at | |
| // least a MeshFilter on them. | |
| // | |
| // Presently only for single-submesh geometry. | |
| [RequireComponent( typeof( MeshFilter))] |
This file contains hidden or 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
| <?php | |
| include_once ( 'unity3d-assetstore.php' ); | |
| // Doesn't matter what is used for the publisher name, | |
| // the key still points to only one publisher. | |
| $authArray = array ( | |
| 'publisher' => '{PUBLISHER_NAME}' | |
| 'key' => '{PUBLISHER_KEY}', | |
| ); |
This file contains hidden or 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
| 1) Enable Profiler in OnPreprocessBuild like following: | |
| public void OnPreprocessBuild(BuildReport report) | |
| { | |
| Profiler.enabled = true; | |
| Profiler.enableBinaryLog = true; | |
| Profiler.logFile = "profilerlog.raw"; | |
| Debug.Log("Enabling Profiler"); | |
| } | |
| 2) Disable Profiler in OnPostProcessBuild | |
| 3) Now put Profiler.Begin/EndSample in the desired code. |
This file contains hidden or 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.Collections; | |
| using UnityEngine; | |
| using UnityEngine.Events; | |
| public static class MonoExtensions | |
| { | |
| public static Coroutine Wait(this MonoBehaviour mono, float delay, UnityAction action) | |
| { | |
| return mono.StartCoroutine(ExecuteAction(delay, action)); | |
| } |
This file contains hidden or 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 "Name" { | |
| Properties { | |
| _Name ("display name", Range (min, max)) = number | |
| _Name ("display name", Float) = number | |
| _Name ("display name", Int) = number | |
| _Name ("display name", Color) = (number,number,number,number) | |
| _Name ("display name", Vector) = (number,number,number,number) |