Skip to content

Instantly share code, notes, and snippets.

View rthompsonj's full-sized avatar

Robert Thompson rthompsonj

  • Austin, TX
View GitHub Profile
using UnityEngine;
using System.Collections;
public class RoamBetweenPoints : MonoBehaviour {
public Transform[] targets;
public LayerMask groundLayer;
private Transform target;
private NavMeshAgent agent;
@mrserverless
mrserverless / Unity3d .gitattributes
Last active May 7, 2018 11:31 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
using UnityEditor;
using UnityEngine;
[CustomPropertyDrawer(typeof(SceneAssetPathField))]
public class SceneAssetPathFieldPropertyDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
var oldPath = AssetDatabase.LoadAssetAtPath<SceneAsset>(property.stringValue);
@jakerullman
jakerullman / pip.js
Created January 17, 2017 19:31
bookmarklet to activate safari picture-in-picture mode
javascript:document.querySelector("video").webkitSetPresentationMode("picture-in-picture");
@ChemiKhazi
ChemiKhazi / EnumFlagAttribute.cs
Created April 29, 2014 09:59
Unity3d property drawer for automatically making enums flags into mask fields in the inspector.
using UnityEngine;
public class EnumFlagAttribute : PropertyAttribute
{
public string enumName;
public EnumFlagAttribute() {}
public EnumFlagAttribute(string name)
{
@louisvalet
louisvalet / Colors
Last active November 17, 2020 09:35
I heard you needed colors
using UnityEngine;
public static class Colors
{
public static readonly Color AbsoluteZero = new Color32( 0, 72, 186, 255 );
public static readonly Color Acajou = new Color32( 76, 47, 39, 255 );
public static readonly Color AcidGreen = new Color32( 176, 191, 26, 255 );
public static readonly Color Aero = new Color32( 124, 185, 232, 255 );
public static readonly Color AeroBlue = new Color32( 201, 255, 229, 255 );
public static readonly Color AfricanViolet = new Color32( 178, 132, 190, 255 );
@tzapu
tzapu / docker-compose.yml
Last active September 26, 2022 05:13
docker compose file for local server, plex, transmission, sonarr, radarr, ombi, netdata, nextcloud
version: '2.1'
services:
transmission:
container_name: transmission
image: dperson/transmission
restart: unless-stopped
depends_on:
- plex
network_mode: host
environment:
@jackcarter
jackcarter / slack_delete.py
Last active November 29, 2023 07:03
Delete Slack files older than 30 days. Rewrite of https://gist.github.com/jamescmartinez/909401b19c0f779fc9c1
import requests
import time
import json
token = ''
#Delete files older than this:
ts_to = int(time.time()) - 30 * 24 * 60 * 60
def list_files():
@morpheus-solutions
morpheus-solutions / CloudMap.cs
Last active January 9, 2024 05:37
Cloudmap for use on Terrains and using the Expanse Creative sky. Assign script under your terrain, create your particle system and assign to the script.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CloudMap : MonoBehaviour
{
private Terrain m_terrain;
[Tooltip("The Global particle System for rain/snow on the terrain according to the cloud map")]
public ParticleSystem m_globalParticles;
[Tooltip("Lower values will emit from denser clouds")]
@jwreagor
jwreagor / EmacsKeyBinding.dict
Created March 20, 2014 18:41
Global Emacs Key Bindings for OS X
{
/* Keybindings for emacs emulation. Compiled by Jacob Rus.
*
* This is a pretty good set, especially considering that many emacs bindings
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and
* perhaps a few more, are already built into the system.
*
* BEWARE:
* This file uses the Option key as a meta key. This has the side-effect
* of overriding Mac OS keybindings for the option key, which generally