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 (Input.GetMouseButtonDown(0)) | |
{ | |
//empty RaycastHit object which raycast puts the hit details into | |
var hits = new RaycastHit[0]; | |
//ray shooting out of the camera from where the mouse is | |
var ray = Camera.allCameras[0].ScreenPointToRay(Input.mousePosition); | |
if ((hits = Physics.RaycastAll(ray)).Length > 0) | |
{ | |
//print out the name if the raycast hits something |
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/Round Rect" { | |
Properties { | |
_Color ("Color", Color) = (1,1,1,1) | |
_Pos("Position", Vector) = (0,0,0,0) | |
_Width("Width", float) = 0.0 | |
_Height ("Height", float) = 0.0 | |
_Radius ("Radius", float) = 0.5 | |
} | |
SubShader { |
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
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' | |
Shader "Unlit/FrostedGlass" | |
{ | |
Properties | |
{ | |
_Radius("Radius", Range(1, 255)) = 1 | |
} | |
Category |