Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
- ⌘ : Command key
- ⌃ : Control key
- ⌫ : Delete key
- ← : Left arrow key
- → : Right arrow key
- ↑ : Up arrow key
| // The MIT License (MIT) - https://gist.github.com/bcatcho/1926794b7fd6491159e7 | |
| // Copyright (c) 2015 Brandon Catcho | |
| using UnityEngine; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| #if UNITY_EDITOR | |
| using System; | |
| using UnityEditor; | |
| using UnityEditor.Sprites; |
| crypto = require "crypto" | |
| key = "this is my password. Make it as long as you want. But its hashed into 512 bytes." | |
| text = "This is the text. as long as you want it" | |
| hash = (utf8String)-> | |
| hasher = crypto.createHash('sha512') | |
| hasher.update(utf8String, 'utf8') | |
| hexString = hasher.digest('hex') | |
| return hexString |
| using UnityEngine; | |
| /* | |
| * Most functions taken from Tween.js - Licensed under the MIT license | |
| * at https://github.com/sole/tween.js | |
| * Quadratic.Bezier by @fonserbc - Licensed under WTFPL license | |
| */ | |
| public delegate float EasingFunction(float k); | |
| public class Easing |
| using UnityEngine; | |
| using System.Collections; | |
| public class GizmoUtility { | |
| static GUIStyle _guiStyle; | |
| static GUIStyle _GuiStyle | |
| { | |
| get{ | |
| if( _guiStyle == null ) |
| float frac(float x) | |
| { | |
| return x - floor(x); | |
| } | |
| float gradientNoise(float x, float y) | |
| { | |
| float f = 0.06711056f * x + 0.00583715f * y; | |
| return frac(52.9829189f * frac(f)); | |
| } |
| A collection of useful C# extension methods for the Unity engine. |
| using UnityEngine; | |
| using System; | |
| using System.Text; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| public class LSystemGenerator : MonoBehaviour | |
| { | |
| [Serializable] |
| # Thanks to commenters for providing the base of this much nicer implementation! | |
| # Save and run with $ python 0dedict.py | |
| # You may need to hunt down the dictionary files yourself and change the awful path string below. | |
| # This works for me on MacOS 10.14 Mohave | |
| from struct import unpack | |
| from zlib import decompress | |
| import re | |
| filename = '/System/Library/Assets/com_apple_MobileAsset_DictionaryServices_dictionaryOSX/9f5862030e8f00af171924ebbc23ebfd6e91af78.asset/AssetData/Oxford Dictionary of English.dictionary/Contents/Resources/Body.data' | |
| f = open(filename, 'rb') |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
| // From MALQUA | |
| // https://feedback.unity3d.com/suggestions/custom-element-size-in-reorderable-list | |
| // http://i.imgur.com/fIbBorr.gifv | |
| ReorderableList CreateList (SerializedObject obj, SerializedProperty prop) | |
| { | |
| ReorderableList list = new ReorderableList (obj, prop, true, true, true, true); | |
| list.drawHeaderCallback = rect => { | |
| EditorGUI.LabelField (rect, "Sprites"); |