Skip to content

Instantly share code, notes, and snippets.

@jeffvella
jeffvella / DebugDrawer.cs
Last active October 6, 2019 01:44
Updated for jobs.
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using UnityEngine;
using System.Diagnostics;
using Unity.Burst;
using Debug = UnityEngine.Debug;
namespace Vella.Common
{
@instance-id
instance-id / DarkTheme.cs
Last active February 6, 2025 02:21
Legit/Legal Unity 2019.3.0bx beta dark theme one click converter
// --- instance.id ------------------------------------------------------------
// Thanks to TheZombieKiller and Peter77 for creating this
// https://forum.unity.com/threads/editor-skinning-thread.711059/#post-4785434
// Tested on Unity 2019.3.0b1 - 95% Dark mode Conversion
// Example Screenshot - https://i.imgur.com/9q5VPQk.png
// (Note - Once I ran this, I had to hit play and then it took effect)
// ----------------------------------------------------------------------------
using System;
using System.Text.RegularExpressions;
version: 2.1
executors:
unity_exec:
docker:
- image: gableroux/unity3d:2018.4.5f1-android
environment:
BUILD_NAME: my_build_name
.build: &build
using UnityEngine;
public static class PhysicsDebugDraw
{
// Draws just the box at where it is currently hitting.
public static void DrawBoxCastOnHit(Vector3 origin, Vector3 halfExtents, Quaternion orientation, Vector3 direction, float hitInfoDistance, Color color)
{
origin = CastCenterOnCollision(origin, direction, hitInfoDistance);
DrawBox(origin, halfExtents, orientation, color);
}
param(
[parameter(Position=0,Mandatory=$false)][string]$PSReadlineChordProvider = 'Ctrl+t',
[parameter(Position=1,Mandatory=$false)][string]$PSReadlineChordReverseHistory = 'Ctrl+r',
[parameter(Position=1,Mandatory=$false)][string]$PSReadlineChordSetLocation = 'Alt+c',
[parameter(Position=1,Mandatory=$false)][string]$PSReadlineChordReverseHistoryArgs = 'Alt+a')
function Invoke-FuzzyEdit() {
param($Directory=$null)
$files = @()
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UniGLTF;
namespace VRM.DynamicBoneExtension
{
public class DynamicBoneLoadUtility {
public static void LoadSecondary(Transform root, List<Transform> nodes,
glTF_VRM_SecondaryAnimation secondaryAnimation)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UnityEditor.VFX.Block
{
[VFXInfo(category = "Color")]
class ColorBlend : VFXBlock
{
@gmolveau
gmolveau / firefox_dark_background.md
Last active April 24, 2025 19:03
Firefox dark background / theme for new tab and loading screen

Firefox Dark Background

  • How to change the background on Firefox to a dark one on new tab / loading screen ?

Procedure

  • Type about:config in the URL bar
  • Search toolkit.legacyUserProfileCustomizations.stylesheets and double-click the field to set it to true
  • Type about:support in the URL bar
  • Look for Profile folder field and click on the open button next to it.
@sabresaurus
sabresaurus / WindowKiller.cs
Created January 29, 2019 23:06
If an editor window breaks (due to an issue with serialized internal state for example) it can be a pain to close and reopen it as the context menu for closing it no longer works. This utility allows you to close any editor window.
// MIT License
//
// Copyright (c) 2019 Sabresaurus
//
// 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:
@mtrive
mtrive / EnableThreads.cs
Last active September 11, 2022 07:07
Unity Editor script to enable WebAssembly multithreading
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
class EnableThreads
{
static EnableThreads()
{
PlayerSettings.WebGL.linkerTarget = WebGLLinkerTarget.Wasm;
PlayerSettings.WebGL.threadsSupport = true;