marp | theme | class |
---|---|---|
true |
default |
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
private const string LastLayout = "Library/LastEditModeLayout.wlt"; | |
private delegate void SaveWindowLayoutDelegate(string path); | |
private static SaveWindowLayoutDelegate _saveWindowLayout; | |
[InitializeOnLoadMethod] | |
private static void Init() | |
{ | |
var windowLayoutType = typeof(Editor).Assembly.GetType("UnityEditor.WindowLayout"); | |
var save = windowLayoutType.GetMethod("SaveWindowLayout", BindingFlags.Public | BindingFlags.Static); |
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
public static void CubeWireCorners(Vector3 center, Vector3 size) | |
{ | |
var ext = size * .5f; | |
DrawCorner(Matrix4x4.TRS(center - ext, Quaternion.identity, Vector3.one)); | |
DrawCorner(Matrix4x4.TRS(center + ext, Quaternion.Euler(180f, 90f, 0f), Vector3.one)); | |
DrawCorner(Matrix4x4.TRS(center + new Vector3(-ext.x, -ext.y, ext.z), Quaternion.Euler(0f, 90f, 0f), Vector3.one)); | |
DrawCorner(Matrix4x4.TRS(center + new Vector3(-ext.x, ext.y, ext.z), Quaternion.Euler(180f, 0f, 0f), Vector3.one)); | |
DrawCorner(Matrix4x4.TRS(center + new Vector3(-ext.x, ext.y, -ext.z), Quaternion.Euler(180f, -90f, 0f), Vector3.one)); | |
DrawCorner(Matrix4x4.TRS(center + new Vector3( ext.x, -ext.y, -ext.z), Quaternion.Euler(0f, -90f, 0f), Vector3.one)); | |
DrawCorner(Matrix4x4.TRS(center + new Vector3( ext.x, -ext.y, ext.z), Quaternion.Euler(0f, 180f, 0f), Vector3.one)); |
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; | |
using System.Text.RegularExpressions; | |
/// <summary> | |
/// Semantic Version type (see https://semver.org/). | |
/// </summary> | |
public class SemVer : IComparable<SemVer>, IEquatable<SemVer> | |
{ | |
public readonly int Major, Minor, Patch; | |
public readonly string PreRelease, Build; |
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 System.Linq; | |
using UnityEngine; | |
using UnityEngine.ProBuilder; | |
using UnityEngine.ProBuilder.MeshOperations; | |
namespace PipeDreams | |
{ | |
sealed class Pipe : MonoBehaviour |
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.Generic; | |
using UnityEngine; | |
using UnityEngine.ProBuilder; | |
namespace PipeDreams | |
{ | |
public class PipeManager : MonoBehaviour | |
{ | |
public float extrudeSpeed = 1f; | |
public float minExtrudeDistance = 2f; |
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 UnityEngine; | |
using UnityEditor; | |
static class LockObjects | |
{ | |
[MenuItem("Edit/Lock Selection &l")] | |
static void LockSelected() | |
{ | |
foreach (var o in Selection.gameObjects) | |
o.hideFlags = o.hideFlags | HideFlags.NotEditable; |
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 System.Linq; | |
using UnityEngine; | |
using UnityEditor; | |
public class FindGameObjectsWithMesh : EditorWindow | |
{ | |
[MenuItem("Tools/ProBuilder/Debug/Find GameObjects with Mesh Name")] | |
private static void MenuInit() |
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
/** | |
* This shader was created with Shaderforge but contains multiple manual edits. | |
* If you modify this shader make sure to go through and pack uv1 and uv2 channels | |
* into a single float4 to save on registers (on penalty of compile error) | |
*/ | |
// Shader created with Shader Forge v1.38 | |
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/ | |
// Note: Manually altering this data may prevent you from opening it in Shader Forge | |
// Uncomment (just the //) this line to edit with ShaderForge | |
// /*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:Standard,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:3,spmd:1,trmd:0,grmd:1,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:True,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg |
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
#!/bin/bash | |
# Jokes credit: http://pun.me/pages/dad-jokes.php | |
# put this in ~/bin or wherever and alias it: | |
# git config --global alias.dad '!sh ~/bin/git-dad.sh' | |
JOKES=("Did you hear about the restaurant on the moon? Great food, no atmosphere." | |
"What do you call a fake noodle? An Impasta." | |
"How many apples grow on a tree? All of them." | |
"Want to hear a joke about paper? Nevermind it's tearable." | |
"I just watched a program about beavers. It was the best dam program I've ever seen." |
NewerOlder