Skip to content

Instantly share code, notes, and snippets.

View blackbone's full-sized avatar
:shipit:
shipit

Dmytro blackbone

:shipit:
shipit
View GitHub Profile
@mukaschultze
mukaschultze / URLParameters.cs
Created January 11, 2022 03:26
Unity URL Parameters (WebGL)
/* * * * *
* URLParameters.cs
* ----------------
*
* This singleton script provides easy access to any URL components in a Web-build.
* Since Unity is about to deprecate the old "Application.ExternalEval" api we can
* no longer inject our javascript into the browser. We now need to use a jslib file
* which holds the javascript part. This script, when imported in a project, will
* automatically extract a jslib file into the Plugins folder named: "URLParameters.jslib".
*
@LotteMakesStuff
LotteMakesStuff / StatsBarAttribute.cs
Last active January 23, 2025 01:57
StatsBar property drawer for Unity~ Add a [StatsBar] attribute to a property to make it draw a lil bar, really useful for visualizing character stats like Health or Mana.
// NOTE DONT put in an editor folder
using UnityEngine;
public class StatsBarAttribute : PropertyAttribute
{
public string valueMax;
public StatsBarColor color;
public StatsBarAttribute(string valueMax = null, StatsBarColor color = StatsBarColor.Red)