This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class HelicalLayout : MonoBehaviour | |
{ | |
int _numberOfNodes; | |
public float Radius = 1f; | |
public float Pitch = 1f; | |
public float Turn = 30f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A loop drop table for Unity, somewhat inspired by http://www.lostgarden.com/2014/12/loot-drop-tables.html | |
// TODO: Use properties { get; set } to automatically call UpdateWeightRanges() when | |
// any Weight is changed, or any item is added or removed from the list | |
// We could then also add an autoupdating (readonly) Sum field, replacing calls to GetSumOfWeights() | |
// TODO: Rather than making Prefab a GameObject, call it Obj and make this a LootTable<T> generic so we | |
// can use any type as the associated object. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.EventSystems; | |
//by Ralph Barbagallo | |
//www.flarb.com | |
//www.ralphbarbagallo.com | |
//@flarb | |
public class VRInputModule : BaseInputModule { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Google Cardboard Camera extractor | |
# Extracts audio and second image from the XMP header in Cardboard Camera images | |
# Requires python-xmp-toolkit ( pip install python-xmp-toolkit ) | |
# | |
# Usage: | |
# $ carboardcam_extract.py myimage_vr.jpg | |
# | |
# Creates two new files - myimage_vr_audio.mp4 and myimage_vr_righteye.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Unlit Colored Double Sided" { | |
Properties { | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
} | |
Category { | |
Lighting Off | |
ZWrite On | |
Cull Off | |
SubShader { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A collection of useful C# extension methods for the Unity engine. |
NewerOlder