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; | |
| 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; |
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 "Unlit/Transparent Colored" { | |
| Properties { | |
| _Color ("Main Color", Color) = (1,1,1,1) | |
| _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} | |
| } | |
| SubShader { | |
| Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"} | |
| ZWrite Off |
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; | |
| /// <summary> | |
| /// ~ Fps counter for unity ~ | |
| /// Brief : Calculate the FPS and display it on the screen | |
| /// HowTo : Create empty object at initial scene and attach this script!!! | |
| /// </summary> | |
| public class UniFPSCounter : MonoBehaviour | |
| { | |
| // for ui. |
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; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| public class RandomPointOnMesh : MonoBehaviour | |
| { | |
| public MeshCollider lookupCollider; | |
| public bool bangGetPoint; | |
| private Vector3 randomPoint; |
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 "Example/Decal" { | |
| Properties { | |
| _MainTex ("Base (RGB)", 2D) = "white" {} | |
| } | |
| SubShader { | |
| Tags { "RenderType"="Opaque" "Queue"="Geometry+1" "ForceNoShadowCasting"="True" } | |
| LOD 200 | |
| Offset -1, -1 | |
| CGPROGRAM |
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; | |
| /// <summary> | |
| /// Keeps constant camera width instead of height, works for both Orthographic & Perspective cameras | |
| /// Made for tutorial https://youtu.be/0cmxFjP375Y | |
| /// </summary> | |
| public class CameraConstantWidth : MonoBehaviour | |
| { | |
| public Vector2 DefaultResolution = new Vector2(720, 1280); | |
| [Range(0f, 1f)] public float WidthOrHeight = 0; |
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/MobileOcclusion" | |
| { | |
| SubShader { | |
| Pass { | |
| // Render the Occlusion shader before all | |
| // opaque geometry to prime the depth buffer. | |
| Tags { "Queue"="Geometry" } | |
| ZWrite On | |
| ZTest LEqual |