Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
public unsafe class NetStandardPlus
{
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void MyStdcallDelegate();
public static void Call(delegate*<void> action) => action();
@HiWill
HiWill / MaterialGradientDrawer.cs
Created August 27, 2021 02:36 — forked from totallyRonja/MaterialGradientDrawer.cs
A Material Property Drawer for the [Gradient] attribute which lets you edit gradients and adds them to the shader as textures. More information here: https://twitter.com/totallyRonja/status/1368704187580682240
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
public class MaterialGradientDrawer : MaterialPropertyDrawer {
private int resolution;
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;}
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
@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/
@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 / 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 / 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 / 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 / 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