Skip to content

Instantly share code, notes, and snippets.

View MattRix's full-sized avatar

Matt Rix MattRix

View GitHub Profile
@MattRix
MattRix / readme.txt
Created May 15, 2014 23:14 — forked from anonymous/readme.txt
Cake Monsters!
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@MattRix
MattRix / Unity-BlenderToFBX.py
Last active January 8, 2023 12:51
Custom Unity-BlenderToFBX based on a version from blenderartists.org with some minor modifications
##########################################################
# Custom Blender -> Unity Pipeline
# http://www.mimimi-productions.com, 2014
# Version: 1.9.M2
# Only for Blender 2.58 and newer
#
# Thanks to kastoria, jonim8or and Freezy for their support!
# Special thanks to Sebastian hagish Dorda for implementing the sort methods.
# http://www.blenderartists.org
##########################################################
@MattRix
MattRix / BitCrusher.cs
Created September 15, 2014 20:44
Crusher
public class BitCrusher : MonoBehaviour
{
[Range (1f,16f)]
public float bits = 16f;
[Range (20f,48000f)]
public float sampleRate = 48000f;
private float phase = 0;
private float last = 0;
@MattRix
MattRix / RXLookingGlass.cs
Created November 3, 2014 21:09
This class wraps an internal Unity method that lets you to check if a ray intersects a mesh. Place it in an Editor folder.
using UnityEngine;
using UnityEditor;
using System.Collections;
using System;
using System.Linq;
using System.Reflection;
[InitializeOnLoad]
public class RXLookingGlass
{
@MattRix
MattRix / Bench.cs
Last active November 12, 2015 15:31
Photobomb painting code
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
public class Bench : MonoBehaviour
{
static public bool SHOULD_DEBUG = true;
static public Color defaultColor = Color.white;
@MattRix
MattRix / RXSolutionFixer
Created November 24, 2014 19:33
This upgrades your csproj files to .NET 4.0 so you can use default parameters (etc) while building in MonoDevelop
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.Collections;
using System;
class RXSolutionFixer : AssetPostprocessor
{
@MattRix
MattRix / RXSolutionFixer.cs
Created November 24, 2014 19:39
The advanced version of my RXSolutionFixer, this one upgrades the csproj and removes all unityprojs from the solution
using UnityEngine;
using System.Collections;
using UnityEditor;
using System.IO;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System;
class RXSolutionFixer : AssetPostprocessor
@MattRix
MattRix / MonoBehaviourInspector
Last active October 12, 2021 02:51
Allows you to use OnInspectorGUI in MonoBehaviour directly, rather than having to create a CustomEditor
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
[CustomEditor (typeof(MonoBehaviour),true)]
[CanEditMultipleObjects]
public class MonoBehaviourInspector : Editor
{
@MattRix
MattRix / Playstation4WinProfile.cs
Created December 30, 2014 14:52
InControl device profile for a *wireless* PS4 controller on Windows
using System;
namespace InControl
{
// @cond nodoc
[AutoDiscover]
public class PlayStation4WinProfile : UnityInputDeviceProfile
{
public PlayStation4WinProfile()
@MattRix
MattRix / SolutionFixer.cs
Created January 15, 2015 02:44
Updates the solution .NET version and removes UnityScript projects
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.IO;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System;
class SolutionFixer : AssetPostprocessor