Skip to content

Instantly share code, notes, and snippets.

View coryleach's full-sized avatar
💭
👾

Cory Leach of Legends coryleach

💭
👾
View GitHub Profile
@coryleach
coryleach / TMPro-Billboard.shader
Created August 9, 2023 23:57 — forked from JonahGrimm/TMPro-Billboard.shader
Unity TextMeshPro Billboard / always facing camera shader
Shader "TextMeshPro/Distance Field-BillboardFacing"
{
// Very, very slightly tweaked version. Works in 2022.1.18f1 URP 13.1.8
// Enjoy!
// - Jonah
// Billboarding version for TextMeshPro (tested in 2018.3), based on default Distance Field shader.
// ** Important part is to DISABLE the dynamic batching! (happens in this shader) **
// ...Took a while to figure out that one.
@coryleach
coryleach / RequestService.cs
Last active June 30, 2023 18:50
Service for Request-Response pattern style communications over the network using FishNet
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using FishNet.Broadcast;
using FishNet.Connection;
using FishNet.Managing.Client;
using FishNet.Managing.Server;
using UnityEngine;
/// <summary>
@coryleach
coryleach / CustomEvent.lua
Created March 2, 2021 21:37
Custom events class created for use in Core
--[[
CustomEvent
Author Fuddy
Date 10/04/2020
Used to create events that mimic Core API's Events
Usage:
--Require this script by adding an asset reference to your script with the name "CustomEvent"
local CustomEvent = require(script:GetCustomProperty("CustomEvent"))
@coryleach
coryleach / DoubleSlider.cs
Created January 9, 2020 20:35
Double Slider that can be used to select a range of values rather than a single value on a slider.
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
using System;
using UnityEngine.Events;
using UnityEngine.EventSystems;
namespace Gameframe.UI
{
@coryleach
coryleach / HeadlessCoroutine.cs
Last active September 16, 2019 23:48
Unity Coroutines without MonoBehaivours.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using UnityEngine;
/// <summary>
/// Utility for starting coroutines that aren't attached to a MonoBehaviour or GameObject
/// Just call HeadlessCoroutine.Start(MyCoroutine());