Skip to content

Instantly share code, notes, and snippets.

View glitchersgames's full-sized avatar
💭
Making Drive Buy - Delivery Battles!

Glitchers glitchersgames

💭
Making Drive Buy - Delivery Battles!
View GitHub Profile
using UnityEngine;
using System.Collections;
// Based on work on:
// https://gist.github.com/munkbusiness/9e0a7d41bb9c0eb229fd8f2313941564
// https://gist.github.com/aVolpe/707c8cf46b1bb8dfb363
// https://stackoverflow.com/questions/39651021/vibrate-with-duration-and-pattern/39668630#39668630
/// <summary>
/// Android Vibration support. Uses VibrationEffect on API 26 or above (Android 8)
using UnityEngine;
namespace Cham
{
/// <summary>
/// ソフトウェアキーボードの表示領域を管理するクラス
/// </summary>
public static class SoftwareKeyboaryArea
{
/// <summary>
@aras-p
aras-p / ComputeOcclusionFromDepth.shader
Last active April 15, 2022 17:50
Unity command buffer that modifies screenspace shadow mask
Shader "Hidden/ComputeOcclusion"
{
Properties
{
_MainTex ("", 2D) = "white" {}
}
SubShader
{
Pass
{
@jringrose
jringrose / FindProjectReferences.cs
Last active June 17, 2022 21:34
Unity editor extension that uses spotlight on OSX for lightning fast project reference searches. Asset serialization mode should be set to "Force Text" in the editor settings.
/*
MIT License
Copyright (c) 2016 Jesse Ringrose
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
@a-type
a-type / gist:b26e8fc02e64da9e9709
Created February 24, 2015 20:06
Unity3D 3D Bezier Curve Mesh Generator
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Bezier3D : MonoBehaviour
{
public Vector3 start = new Vector3(0, 0, 0);
public Vector3 end = new Vector3(1, 1, 0);
public Vector3 handle1 = new Vector3(0, 1, 0);
public Vector3 handle2 = new Vector3(1, 0, 0);
@tiagosr
tiagosr / SplineSection.cs
Created April 28, 2014 03:22
Hermite Spline for Unity3D
using UnityEngine;
using System.Collections;
public class SplineSection : MonoBehaviour {
public Transform startPoint, startTangent, endPoint, endTangent;
public SplineSection prev, next;
public Vector3 GetPositionAt(float t) {
@masa795
masa795 / UnityTextures.cs
Created June 17, 2013 14:12
Unityが持っているアイコンを表示する。 Unityのバージョンによってはパスが使えなくなるかもしれないので使用時は注意。
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
//Unity 4.1.5
public class UnityTextures : EditorWindow
{