Skip to content

Instantly share code, notes, and snippets.

View QuantumCalzone's full-sized avatar
🍕

QuantumCalzone QuantumCalzone

🍕
View GitHub Profile
@karljj1
karljj1 / SerializedDictionaryExample.cs
Last active February 13, 2024 14:04
Serializing a Dictionary in a VisualElement (Unity 2023.2.0a9)
using System;
using System.Collections.Generic;
using UnityEngine.UIElements;
[Serializable]
class DictItem
{
public int key;
public string value;
}
@ScottJDaley
ScottJDaley / Outline.shader
Last active May 24, 2024 01:49
Wide Outlines Renderer Feature for URP and ECS/DOTS/Hybrid Renderer
// Original shader by @bgolus, modified slightly by @alexanderameye for URP, modified slightly more
// by @gravitonpunch for ECS/DOTS/HybridRenderer.
// https://twitter.com/bgolus
// https://medium.com/@bgolus/the-quest-for-very-wide-outlines-ba82ed442cd9
// https://alexanderameye.github.io/
// https://twitter.com/alexanderameye/status/1332286868222775298
Shader "Hidden/Outline"
{
Properties
@phi-lira
phi-lira / RunXCodeCapture.txt
Created July 8, 2020 20:14
Run XCode Capture from Unity
1. Create a new XCode Metal (library) project.
2. Edit Scheme. Product->Scheme->Edit Scheme
3. Run, Info tab, and point to your application
E.g. /Application/Unity/Hub/Editor/Unity.app
4. Run, Arguments tab to add cmdline arguments
E.g. -projectPath "/Users/name.name/projects/MyProject"
5. Run, Options tab, set to GPU Frame Capture to Metal
6. Run the project and click the camera icon from XCode to take a capture
@LotteMakesStuff
LotteMakesStuff / AutohookAttribute.cs
Last active January 2, 2024 13:54
[Autohook] property drawer for unity - Add this [Autohook] attribute to a property to and the inspector will automagically hook up a valid reference for you if it can find a component attached to the same game object that matches the field you put it on. You can watch a demo of this in action here https://youtu.be/faVt09NGzws <3
// NOTE DONT put in an editor folder!
using UnityEngine;
public class AutohookAttribute : PropertyAttribute
{
}
@unitycoder
unitycoder / old-assetstore.js
Last active October 8, 2018 06:41
GreaseMonkey: Stay in Old Unity Asset Store
// ==UserScript==
// @name Force Old Unity Asset Store
// @version 2
// @include https://www.assetstore.unity3d.com/#!/content/*
// @include https://assetstore.unity.com/packages/*
// @run-at document-start
// @grant none
// ==/UserScript==
// https://unitycoder.com/blog/2018/09/23/browser-plugin-stay-in-old-asset-store/
using GameSparks.Core;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GSDataHelpers {
/** Converts a serializable object into GameSparks compatible GSData. */
public static GSData ObjectToGSData(object obj) {
@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active June 18, 2024 16:46
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@mob-sakai
mob-sakai / RemoveEmptyFolders.cs
Last active September 22, 2023 18:33
Automatically remove empty folders in project for Unity.
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Linq;
using System;
/// <summary>
/// Remove empty folders automatically.
@krishpop
krishpop / export-toby.js
Last active March 21, 2024 22:12
Export Toby
// code courtesy of Toby team
chrome.storage.local.get("state", o => (
((f, t) => {
let e = document.createElement("a");
e.setAttribute("href", `data:text/plain;charset=utf-8,${encodeURIComponent(t)}`);
e.setAttribute("download", f);
e.click();
})(`TobyBackup${Date.now()}.json`, o.state)
));
@jagrosh
jagrosh / Growing A Discord Server.md
Last active February 17, 2024 04:29
Tips for creating and growing a new Discord server

This guide is kept up-to-date as Discord and available resources change!
A basic server template is available here

Creating and Growing a Discord Server

logo

Introduction

Hello! I'm jagrosh#4824! I'm writing this guide to try to help new server owners set up and grow their servers, which is a commonly-requested topic. It's very easy to go about this the wrong way, so it's best to be prepared and make smart decisions so that your community can flourish!

Background