Skip to content

Instantly share code, notes, and snippets.

View omgwtfgames's full-sized avatar

Andrew Perry omgwtfgames

View GitHub Profile
@omgwtfgames
omgwtfgames / vector.py
Last active August 27, 2017 07:49 — forked from jordvisser/vector.py
A vector class in pure python.
"""
The MIT License (MIT)
Copyright (c) 2015 Mat Leonard
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
@omgwtfgames
omgwtfgames / TagsLayersEnumBuilder.cs
Created April 25, 2016 22:27 — forked from Namek/TagsLayersEnumBuilder.cs
Tags and Layers Enums Builder for Unity3D
#if UNITY_EDITOR
using UnityEngine;
using System.Collections;
using UnityEditor;
using System;
using System.IO;
using System.Text;
public class TagsLayersEnumBuilder : EditorWindow {
[MenuItem("Edit/Rebuild Tags And Layers Enums")]
@omgwtfgames
omgwtfgames / LetterSpacing.cs
Last active April 24, 2016 01:25 — forked from tommycutter/LetterSpacing.cs
Letter Spacing Component for Unity 5.3, 5.4
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/*
http://forum.unity3d.com/threads/adjustable-character-spacing-free-script.288277/
Unity 5.1 and 5.2.2+ compatible
Produces an simple tracking/letter-spacing effect on UI Text components.
@omgwtfgames
omgwtfgames / VRInputModule.cs
Created April 22, 2016 01:01 — forked from flarb/VRInputModule.cs
Lets you use a VR world space cursor with World Space Canvases in Unity3D 4.6. Add this to the EventSystem object. Put some box colliders on your buttons in the World Space Canvas. Then, do a trace to see if you're looking at a menu object--if the trace hits one of those buttons, pass it to SetTargetObject. See ralphbarbagallo.com for a longer e…
using UnityEngine;
using UnityEngine.EventSystems;
//by Ralph Barbagallo
//www.flarb.com
//www.ralphbarbagallo.com
//@flarb
public class VRInputModule : BaseInputModule {
@omgwtfgames
omgwtfgames / StareButton.cs
Created April 22, 2016 01:01 — forked from flarb/StareButton.cs
This is a 'stare button' for Google Cardboard apps where you just want to stare at a button over time to select it.
using System;
using System.Reflection;
using UnityEngine;
using System.Collections;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.UI;
public class StareButton : MonoBehaviour, IEventSystemHandler, IPointerExitHandler, IPointerEnterHandler, ISelectHandler {
@omgwtfgames
omgwtfgames / NoiseTexture.cs
Last active March 17, 2021 00:18 — forked from KdotJPG/OpenSimplex2S.java
Visually axis-decorrelated coherent noise function based on the Simplectic honeycomb - C# port
/*
* OpenSimplex (Simplectic) Noise Test for Unity (C#)
* This file is in the Public Domain.
*
* This file is intended to test the functionality of OpenSimplexNoise.cs
* Attach this script to a GameObject with mesh (eg a Quad prefab).
* Texture is updated every frame to assist profiling for performance.
* Using a RenderTexture should perform better, however using a Texture2D
* as an example makes this compatible with the free version of Unity.
*