This file contains hidden or 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 System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| [CreateAssetMenu] | |
| public class Logger : ScriptableObject | |
| { | |
| public const int Verbose = (int)Levels.Verbose; | |
| public const int Debug = (int)Levels.Debug; | |
| public const int Info = (int)Levels.Info; |
This file contains hidden or 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
| -Image: /Users/paulhayes/Downloads/test.png | |
| +Image: /Users/paulhayes/Downloads/DdKJ6sAWAAE_bgX.png | |
| Format: PNG (Portable Network Graphics) | |
| Mime type: image/png | |
| Class: DirectClass | |
| Geometry: 512x512+0+0 | |
| - Resolution: 28.35x28.35 | |
| - Print size: 18.06x18.06 | |
| - Units: PixelsPerCentimeter | |
| + Units: Undefined |
This file contains hidden or 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/python | |
| import sys | |
| import os | |
| import hashlib | |
| def chunk_reader(fobj, chunk_size=1024): | |
| """Generator that reads a file in chunks of bytes""" | |
| while True: | |
| chunk = fobj.read(chunk_size) | |
| if not chunk: |
This file contains hidden or 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 System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class SoundDelayRepeat : MonoBehaviour | |
| { | |
| private AudioSource audioSource; | |
| private float lastPlay; | |
| public float firstTimeDelay; | |
| public float timeInbetweenSound; |
This file contains hidden or 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
| Number.prototype.wrap = function(len){return ((this.valueOf()%len)+len)%len; } |
This file contains hidden or 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 System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public static class TriangleMesh { | |
| public static Mesh Create(float scale){ | |
| Mesh triangle = new Mesh(); | |
| Vector3[] vertexes = new Vector3[3]; | |
| Vector2[] uv = new Vector2[3]; |
This file contains hidden or 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 System; | |
| public static class AppArgs { | |
| public static T GetNamedArgument<T>(string key,T defaultValue) { | |
| string[] args = Environment.GetCommandLineArgs(); | |
| int index = -1; | |
| for(int i=0; i<args.Length-1; i++ ){ | |
| if( args[i] == key ){ | |
| index = i+1; | |
| } |
This file contains hidden or 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 System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class TeleportTarget : MonoBehaviour | |
| { | |
| public string button = "Fire1"; | |
| public Transform lookDirection; | |
| public Transform target; |
This file contains hidden or 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
| // Wizard to convert a cubemap to an equirectangular cubemap. | |
| // Put this into an /Editor folder | |
| // Run it from Tools > Cubemap to Equirectangular Map | |
| using UnityEditor; | |
| using UnityEngine; | |
| using System.IO; | |
| class CubemapToEquirectangularWizard : ScriptableWizard { |