Skip to content

Instantly share code, notes, and snippets.

View dechowdev's full-sized avatar
🚴‍♂️
Office working!

Lucas Dechow dechowdev

🚴‍♂️
Office working!
View GitHub Profile
@orgmir
orgmir / PauseFreeCamera.cs
Last active November 11, 2017 00:39
Unity script to pause the game and adjust the camera freely
using UnityEngine;
using System.Collections;
// Script taken from https://www.reddit.com/r/Unity3D/wiki/screenshots
public class PauseFreeCamera : MonoBehaviour {
float turnSpeed = 2.0f; // Speed of camera turning when mouse moves in along an axis
float panSpeed = 1.0f; // Speed of the camera when being panned
float zoomSpeed = 1.0f; // Speed of the camera going back and forth
@LotteMakesStuff
LotteMakesStuff / InspectorButtonsTest.cs
Last active March 16, 2026 12:52
Code running pack! two property drawing scripts that make it super easy to trigger code via buttons in the inspector, and get feedback! [TestButton] draws you little buttons that call a method on your MonoBehaviour, and [ProgressBar] give you a great way to show feedback from long running methods. These are *super* helpful for things like proced…
using UnityEngine;
using System.Collections;
public class InspectorButtonsTest : MonoBehaviour
{
[TestButton("Generate world", "DoProcGen", isActiveInEditor = false)]
[TestButton("Clear world", "ClearWorld", 2, isActiveInEditor = false)]
[ProgressBar(hideWhenZero = true, label = "procGenFeedback")]
public float procgenProgress = -1;
@nicoplv
nicoplv / PlayFromScene.cs
Last active June 20, 2018 13:14
Editor script to make Play button always start a main scene in Unity 3D (works only with 2017.2 or +)
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
namespace SmartEditors
{
[InitializeOnLoad]
public class PlayFromScene : Editor
{
[MenuItem("Tools/Editor/Play From Scene/Set Main Scene", false, 0)]
@barnybug
barnybug / docker-compose.yml
Created November 21, 2017 11:14
Docker compose for a Docker-in-docker gitlab runners setup
# Docker-in-Docker Gitlab runners setup taken from:
# https://medium.com/@tonywooster/docker-in-docker-in-gitlab-runners-220caeb708ca
dind:
restart: always
privileged: true
volumes:
- /var/lib/docker
image: docker:17.09.0-ce-dind
command:
- --storage-driver=overlay2
@jdah
jdah / wfc.hpp
Created August 5, 2022 15:18
Wave Function Collapse
#pragma once
#include "util/types.hpp"
#include "util/std.hpp"
#include "util/ndarray.hpp"
#include "util/collections.hpp"
#include "util/rand.hpp"
#include "util/hash.hpp"
#include "util/assert.hpp"
#include "util/bitset.hpp"