Skip to content

Instantly share code, notes, and snippets.

View darbotron's full-sized avatar

Alex "darbotron" Darby darbotron

View GitHub Profile
//
// StandaloneBuildCompilationChecker by Alex 'darbotron' Darby
//
// License: https://opensource.org/licenses/unlicense
// TL;DR:
// 1) you may do what you like with it...
// 2) ...except blame me for any consequence of acting on rule 1)
//
#if UNITY_EDITOR
@darbotron
darbotron / ExampleSettings.cs
Last active June 6, 2022 09:11
Super easily (and extensibly) add a project global settings asset to the Unity Editor's project settings panels and/or edit in a floating window
//
// GenericUnityEditorSettings by Alex 'darbotron' Darby
//
// License: https://opensource.org/licenses/unlicense
// TL;DR:
// 1) you may do what you like with it...
// 2) ...except blame me for any consequence of acting on rule 1)
//
using UnityEngine;
using UnityEditor;
@darbotron
darbotron / gist:296017d6dce649fee3ed732ec3d77be2
Last active March 3, 2022 19:20
StoppableCoroutine et al. - a bunch of handy classes for managing coroutines in Unity
//
// License: https://opensource.org/licenses/unlicense
// TL;DR:
// 1) you may do what you like with it...
// 2) ...except blame me for any consequence of acting on rule 1)
//
using System;
using System.Collections;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TargetingCamera : MonoBehaviour
{
[SerializeField] Transform m_Horizontal = null;
[SerializeField] Transform m_Vertical = null;
[SerializeField] Transform m_Target = null;
@darbotron
darbotron / gist:cfedbc33fa28d07977969da9ae73656d
Created November 28, 2019 09:07
C/C++ Low Level Curriculum - Part 2 - Simple Program
int AddOneTo( int iParameter )
{
int iLocal = iParameter + 1;
return iLocal;
}
int main( int argc, char** argv )
{
int iResult = 0;
iResult = AddOneTo( iResult );