Skip to content

Instantly share code, notes, and snippets.

View srtdog64's full-sized avatar

Dongwoo Jeong srtdog64

View GitHub Profile
Shader "Projector/Solid Projector" {
Properties{
_Color("Tint Color", Color) = (1,1,1,1)
_ShadowTex("Cookie", 2D) = "gray" {}
}
Subshader
{
Tags {"Queue" = "Transparent" "RenderType" = "Transparent"}
Pass
{
@yangruihan
yangruihan / EventDispatcher.cs
Last active September 19, 2024 14:48
C# Unity Event Dispatcher
using System;
using System.Collections.Generic;
using UnityEngine;
public delegate void EventHandler(short type);
public delegate void EventHandler<in T>(short type, T data);
public class EventDispatcher
{
@kurtdekker
kurtdekker / JsonPlayerPrefs.cs
Created October 16, 2021 12:29 — forked from brettmjohnson/JsonPlayerPrefs.cs
A replacement for Unity's PlayerPrefs that stores data in a JSON file.
using System;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
/// <summary>
/// A replacement for Unity's PlayerPrefs that stores data in a JSON file.
/// </summary>
[Serializable]
public class JsonPlayerPrefs
@Okay-Roman
Okay-Roman / RadialFillElement.cs
Last active June 23, 2026 13:03
A radial fill element that can be used in Unity UI Toolkit, makes use of MeshWriteData to create a mesh which will only be visible within the confines of its parent due to the overflow attribute.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UIElements;
namespace NS.RomanLib
{
public class RadialFillElement: VisualElement, INotifyValueChanged<float>
{
protected float m_value = float.NaN;
@adammyhre
adammyhre / SessionManager.cs
Last active April 7, 2026 09:07
QuickStart SessionManager for 2025 Multiplayer Services
using System;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using Unity.Services.Authentication;
using Unity.Services.Core;
using Unity.Services.Multiplayer;
using UnityEngine;
using UnityUtils;
public class SessionManager : Singleton<SessionManager> {