Skip to content

Instantly share code, notes, and snippets.

View ariessanchezsulit's full-sized avatar

Aries Sanchez Sulit ariessanchezsulit

View GitHub Profile
#!/bin/bash -e
# PREREQ: add ssh keys to both git cloud host
OLD_ORG=mely0
OLD_REPONAME=test001
OLD_REPO=bitbucket.org
echo "Old repo=git@${OLD_REPO}:${OLD_ORG}/${OLD_REPONAME}"
@ariessanchezsulit
ariessanchezsulit / SkinnedMeshObjectPreviewExample.cs
Created January 22, 2018 12:16 — forked from radiatoryang/SkinnedMeshObjectPreviewExample.cs
An example of a custom ObjectPreview rendering out a SkinnedMesh for Unity Editor C#... I used it for facial expressions and blendshape editing, you might want to use it for something else. I hereby place it under MIT License. Full write-up here: http://www.blog.radiator.debacle.us/2016/06/working-with-custom-objectpreviews-and.html
using UnityEngine;
using UnityEditor;
using System;
using System.Collections;
[CustomPreview(typeof(YourCustomScriptableObject))] // THIS IS VERY IMPORTANT, this is so the editor knows what this is supposed to be previewing at all
public class SkinnedMeshObjectPreviewExample : ObjectPreview {
PreviewRenderUtility m_PreviewUtility;
@ariessanchezsulit
ariessanchezsulit / MultiSceneSetup.cs
Created September 4, 2017 10:52 — forked from svermeulen/MultiSceneSetup.cs
Simple editor script to save and load multi-scene setups within Unity3D
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEditor.SceneManagement;
using UnityEditor;
using System.Collections;
using System.Linq;
public class MultiSceneSetup : ScriptableObject
{
@ariessanchezsulit
ariessanchezsulit / Account.cs
Created April 3, 2017 08:50 — forked from grofit/Account.cs
A GOOD Generic Repository Pattern
public class Account
{
Guid Id {get;set;}
string Name {get;set;}
}
@ariessanchezsulit
ariessanchezsulit / UnityStandardBRDF.cginc
Created November 7, 2016 03:55 — forked from xDavidLeon/UnityStandardBRDF.cginc
UnityStandardBRDF modification for Cel Shading.
#ifndef UNITY_STANDARD_BRDF_INCLUDED
#define UNITY_STANDARD_BRDF_INCLUDED
#include "UnityCG.cginc"
#include "UnityStandardConfig.cginc"
#include "UnityLightingCommon.cginc"
//-------------------------------------------------------------------------------------
// Legacy, to keep backwards compatibility for (pre Unity 5.3) custom user shaders:
#define unity_LightGammaCorrectionConsts_PIDiv4 (IsGammaSpace()? (UNITY_PI/4)*(UNITY_PI/4): (UNITY_PI/4))
@ariessanchezsulit
ariessanchezsulit / 1.cs
Created April 29, 2016 10:23 — forked from cuppster/1.cs
Promises for C# using Generics
/*
modified from original source: https://bitbucket.org/mattkotsenas/c-promises/overview
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Promises
//参考: http://wiki.unity3d.com/index.php?title=Singleton
using UnityEngine;
public abstract class MonoSingleton<T> : MonoBehaviour where T : MonoSingleton<T>
{
private static T instance = null;
public static T Instance {
get {
//Scene内にあったら取得
/*
* Copyright (c) 2013 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining
@ariessanchezsulit
ariessanchezsulit / LICENSE.txt
Created February 15, 2012 16:30 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE