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 "Mobile VR Highlight" { | |
Properties { | |
_ColorOutline ("Outline", Color) = (1,1,1,1) | |
_ColorInterior ("Interior", Color) = (0.25,0.25,0.25,0.25) | |
_ColorInteriorFaded ("Interior Faded", Color) = (0.1,0.1,0.1,0.1) | |
_ColorInteriorOcc ("Interior Occluded", Color) = (0.15,0.15,0.15,0.15) | |
_ColorInteriorOccFaded ("Interior Occluded Faded", Color) = (0.05,0.05,0.05,0.05) | |
_PulseRateMod ("Pulse Rate Modifier", Float) = 4.0 | |
_OutlneWidth ("Outline Pixel Width", Float) = 1.0 | |
} |
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 you see Intel Unity Editor crashes on Apple Silicon hardware that look like this: | |
Thread 0 Crashed:: tid_103 Dispatch queue: com.apple.main-thread | |
0 ??? 0x7ff894e4a940 ??? | |
1 libsystem_kernel.dylib 0x7ff804893506 __psynch_cvwait + 10 | |
2 libmonobdwgc-2.0.dylib 0x15dbb2aff mono_os_event_wait_multiple + 556 | |
3 libmonobdwgc-2.0.dylib 0x15dbb28cd mono_os_event_wait_one + 38 | |
4 libmonobdwgc-2.0.dylib 0x15dbc35a4 mono_thread_info_wait_one_handle + 13 | |
5 libmonobdwgc-2.0.dylib 0x15dae3298 mono_domain_try_unload + 576 |
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
// The MIT License (MIT) | |
// Copyright (c) 2024 David Evans @festivevector | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF O |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
[ExecuteInEditMode] | |
public class GlobalShaderParams : 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
using System.Collections.Generic; | |
using System.Diagnostics; | |
using UnityEditor; | |
using UnityEditor.Build.Reporting; | |
using UnityEngine; | |
using Debug = UnityEngine.Debug; | |
public static class NetworkingTools | |
{ |
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; | |
public class MeshBlit : MonoBehaviour | |
{ | |
public RenderTexture rt; | |
public Mesh mesh; | |
public Material material; | |
public Vector3 meshPosition = new Vector3(0.5f, 0.5f, -1); |
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.Collections.Generic; | |
using System.Diagnostics; | |
using Unity.Burst; | |
using Unity.Collections; | |
using Unity.Jobs; | |
using Unity.Mathematics; | |
using Unity.Profiling; | |
using UnityEngine; | |
using UnityEditor; | |
using UnityEngine.Rendering; |
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; | |
using System.Runtime.InteropServices; | |
/// <see>https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-messagebox</see> | |
public static class NativeWinAlert | |
{ | |
[System.Runtime.InteropServices.DllImport("user32.dll")] | |
private static extern System.IntPtr GetActiveWindow(); | |
public static System.IntPtr GetWindowHandle() |
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
/* | |
From Derek Arndt's tweet | |
https://twitter.com/derekarndt/status/993994998084354048 | |
*/ | |
using UnityEditor; | |
using UnityEditor.Build; | |
using System.Diagnostics; | |
public class BuildAndIncrementVersionNumber : IPostprocessBuild |
NewerOlder