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 "Custom/MinimalSurfaceWithGrabPass" | |
{ | |
Properties | |
{ | |
_Color ("Color", Color) = (1,1,1,1) | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
_Glossiness ("Smoothness", Range(0,1)) = 0.5 | |
_Metallic ("Metallic", Range(0,1)) = 0.0 | |
_SeeThrough ("See Through (not a transparency)", Range(0,1)) = 0.5 | |
} |
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
#!/bin/zsh | |
export EDITOR="nvim" | |
export VISUAL="nvim" | |
export ZDOTDIR="$XDG_CONFIG_HOME/zsh" | |
export HISTFILE="$ZDOTDIR/.zhistory" # History filepath | |
export HISTSIZE=10000 # Maximum events for internal history | |
export SAVEHIST=10000 |
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
// Thanks to Kemble Software https://www.youtube.com/channel/UC-n80lsjMCS3OJR8kFrATLg | |
// Nice hack here: https://www.youtube.com/watch?v=FXMqUdP3XcE | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using TMPro; | |
[RequireComponent(typeof(TextMeshPro)), ExecuteInEditMode] | |
public class TextMeshProWarper : MonoBehaviour |
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
import bpy | |
from mathutils import Vector, Matrix, Quaternion, Euler | |
from random import uniform | |
# Uses Array modifier data to generate OBJECTS rather than just geometry | |
# Find this Gist at https://gist.github.com/rstecca/7fe38e3846749c0118e6bd20cb83c39c | |
# github.com/rstecca | |
# Only works with Array Modifiers with ObjectOffset | |
# Tested in Blender 2.83.1 |
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
{ | |
"dependencies": { | |
"com.unity.standardevents": "exclude", | |
"com.unity.purchasing": "exclude", | |
"com.unity.ads": "exclude", | |
"com.unity.analytics": "exclude", | |
"com.unity.package-manager-ui": "1.8.2", | |
"com.unity.collections":"0.0.8", | |
"com.unity.mathematics":"0.0.7", | |
"com.unity.incrementalcompiler": "0.0.38", |
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
/* | |
From Derek Arndt's tweet | |
https://twitter.com/derekarndt/status/993994998084354048 | |
*/ | |
using UnityEditor; | |
using UnityEditor.Build; | |
using System.Diagnostics; | |
public class BuildAndIncrementVersionNumber : IPostprocessBuild |
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
/* | |
JSON minimal example. | |
To understand how object members map to json and vicecersa. | |
Experiment by changing types and values. | |
twitter: @riccardostecca | |
*/ | |
using System.Collections; | |
using System.Collections.Generic; |
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 System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.EventSystems; | |
/* | |
MAKE A 3D OBJECT DRAGGABLE | |
Riccardo Stecca | |
http://www.riccardostecca.net |
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
/* * * * * * * * | |
PUT THESE AS CLASS MEMBERS | |
* * * * * * * * */ | |
SteamVR_Controller.Device _leftController; | |
private SteamVR_Controller.Device leftcontroller | |
{ | |
get | |
{ | |
return _leftController ?? ((SteamVR_Controller.GetDeviceIndex(SteamVR_Controller.DeviceRelation.FarthestLeft) == -1) ? null : _leftController = SteamVR_Controller.Input(SteamVR_Controller.GetDeviceIndex(SteamVR_Controller.DeviceRelation.FarthestLeft))); |
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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
[ExecuteInEditMode] | |
public class DebugTriangleNormals : MonoBehaviour { | |
#if UNITY_EDITOR | |
List<Vector3> trisCenters; |