Skip to content

Instantly share code, notes, and snippets.

@HiWill
HiWill / Loom.cs
Created December 4, 2015 03:22 — forked from ITTIM/Loom.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
using System.Threading;
using System.Linq;
public class Loom : MonoBehaviour
{
public static int maxThreads = 8;
@HiWill
HiWill / collision.cpp
Created January 22, 2016 06:15 — forked from leegao/collision.cpp
Polygonal Collision Detection
// Imagine we have two edges bounded by the vertices (a,b) and (d,e)
// line(a=>b) = (b-a)*mu + a
// line(d=>e) = (e-d)*lambda + d
//
// or
// ( ) ( a.x )
// ab = | b-a | * mu + | |
// ( ) ( a.y )
//
// ( ) ( d.x )
@HiWill
HiWill / UsefulUnityAssets.md
Created February 3, 2016 09:23 — forked from terrehbyte/UsefulUnityAssets.md
Useful Open-Source Unity Assets

Useful Open-Source Unity Assets

This is a compilation of various open-source Unity plugins, codebases, or utility scripts that may aid in expediting the development process.

Art / Design Tools

ProbePolisher - Light Probe Editor - keijiro

"ProbePolisher is a Unity Editor plugin for editing light probes. It works both on Unity Basic (free) and Unity Pro."

Code
Releases

@HiWill
HiWill / SpotLight.shader
Created May 21, 2016 02:56 — forked from Yash-Kansagara/SpotLight.shader
Fake SpotLight Halo from a cylinder mesh(provided by Unity) with Shader.
Shader "Yash/SpotLight" {
Properties {
_Color("Main Color",Color) = (1,1,1,.5)
_Size("Size",Float) = 1
}
SubShader {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" }
Blend One One
Pass
@HiWill
HiWill / MobileIllumVertexLit.shader
Created May 22, 2016 05:02 — forked from aras-p/MobileIllumVertexLit.shader
Simple Illuminated VertexLit shader
Shader "Mobile/Illum VertexLit" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
_Illum ("Illum (RGB)", 2D) = "black" {}
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 80
Pass {
@HiWill
HiWill / SimpleGeo.cs
Created July 14, 2016 10:42 — forked from phosphoer/SimpleGeo.cs
Simple Geometry Painter for Unity
// The MIT License (MIT)
// Copyright (c) 2016 David Evans @phosphoer
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
@HiWill
HiWill / FSScrollController.cs
Created August 17, 2016 05:45 — forked from russianryebread/FSScrollController.cs
Inertial Scrolling for Unity 3D
using UnityEngine;
using System.Collections;
using Holoville.HOTween;
namespace FS.Handlers
{
public class FSScrollController : MonoBehaviour {
public float contentOverflowY = 0f;
public float contentHeight = 0f;
@HiWill
HiWill / NineSliceScaling.cs
Created August 24, 2016 07:44 — forked from mandarinx/NineSliceScaling.cs
9 slice scaling with a mesh in Unity3D
using UnityEngine;
// Nine slice scaling using a Mesh.
// Original code by Asher Vollmer
// https://twitter.com/AsherVo
// http://ashervollmer.tumblr.com
// Modifications by Thomas Viktil
// https://twitter.com/mandarinx
// http://ma.ndar.in/
Shader "Custom/GreyScaleForBackPlay" {
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
_EffectAmount ("Effect Amount", Range (0, 1)) = 1.0
}
SubShader
using UnityEngine;
using UnityEngine.Assertions;
using System.Linq;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace SmartCombine {
public class SmartMeshData {
public Mesh mesh {get; private set;}
public Matrix4x4 transform {get; private set;}