Skip to content

Instantly share code, notes, and snippets.

View eladrianovalle's full-sized avatar

Adriano Valle eladrianovalle

View GitHub Profile
@innocuo
innocuo / AddUV
Last active February 25, 2022 07:32
How to create a rigged humanoid character using Clayxels and Puppet3D.
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class AddUV : MonoBehaviour
{
public Mesh mesh;
void Awake()
@hmans
hmans / BobTheBuilder.cs
Last active April 27, 2024 23:26
A basic pipeline for performing headless Unity builds for multiple platforms at once.
/* This needs to live in a folder named "Editor", or it won't work. Doesn't have to be named
"BobTheBuilder", though. Name it whatever you want! */
using System;
using UnityEditor;
using UnityEngine;
public class BobTheBuilder
{
/* List of scenes to include in the build */
@vildninja
vildninja / RemoveMissingScriptsRecursively.cs
Created March 25, 2019 10:06
Remove missing MonoBehaviour script components in Unity 2019.1 including visiting prefafab assets.
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEditor;
public static class FindMissingScriptsRecursively
{
[MenuItem("Auto/Remove Missing Scripts Recursively Visit Prefabs")]
private static void FindAndRemoveMissingInSelected()
{
// EditorUtility.CollectDeepHierarchy does not include inactive children
@JohannesMP
JohannesMP / LICENSE
Last active March 9, 2024 11:26
[Unity3D] A Reliable, user-friendly way to reference SceneAssets by script.
/*******************************************************************************
* Don't Be a Jerk: The Open Source Software License.
* Adapted from: https://github.com/evantahler/Dont-be-a-Jerk
*******************************************************************************
* _I_ am the software author - JohannesMP on Github.
* _You_ are the user of this software. You might be a _we_, and that's OK!
*
* This is free, open source software. I will never charge you to use,
* license, or obtain this software. Doing so would make me a jerk.
*
@tomkail
tomkail / ExtendedScriptableObjectDrawer.cs
Last active April 2, 2024 18:56
Displays the fields of a ScriptableObject in the inspector
// Developed by Tom Kail at Inkle
// Released under the MIT Licence as held at https://opensource.org/licenses/MIT
// Must be placed within a folder named "Editor"
using System;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
@bitbutter
bitbutter / PerlinShake
Created April 13, 2015 13:37
Modified version of Michael G's PerlinShake
using UnityEngine;
using System.Collections;
public class PerlinShake : MonoBehaviour, IShaker {
public float duration = 0.5f;
public float speed = 1.0f;
public float magnitude = 0.1f;
public bool test = false;
@renaudbedard
renaudbedard / gist:7a90ec4a5a7359712202
Created September 11, 2014 18:39
Billboarding for Unity surface shaders
void vert(inout appdata_full v, out Input o)
{
UNITY_INITIALIZE_OUTPUT(Input, o);
// get the camera basis vectors
float3 forward = -normalize(UNITY_MATRIX_V._m20_m21_m22);
float3 up = float3(0, 1, 0); //normalize(UNITY_MATRIX_V._m10_m11_m12);
float3 right = normalize(UNITY_MATRIX_V._m00_m01_m02);
// rotate to face camera
@natelandau
natelandau / .bash_profile
Last active April 30, 2024 18:07
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@ftvs
ftvs / CameraShake.cs
Last active April 17, 2024 23:08
Simple camera shake effect for Unity3d, written in C#. Attach to your camera GameObject. To shake the camera, set shakeDuration to the number of seconds it should shake for. It will start shaking if it is enabled.
using UnityEngine;
using System.Collections;
public class CameraShake : MonoBehaviour
{
// Transform of the camera to shake. Grabs the gameObject's transform
// if null.
public Transform camTransform;
// How long the object should shake for.
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 2, 2024 03:13
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx