This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef TRICUBIC_INCLUDED | |
#define TRICUBIC_INCLUDED | |
float4 Cubic(float v) | |
{ | |
float4 n = float4(1.0, 2.0, 3.0, 4.0) - v; | |
float4 s = n * n * n; | |
float x = s.x; | |
float y = s.y - 4.0 * s.x; | |
float z = s.z - 4.0 * s.y + 6.0 * s.x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
// Restrict raycasting to a sprite mesh shape | |
// Could use Image.alphaHitTestMinimumThreshold to mask but that requires read/write images which can't be packed | |
[RequireComponent(typeof(Image))] | |
public class SpriteMeshRaycastFilter : MonoBehaviour, ICanvasRaycastFilter { | |
private RectTransform rectTransform; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/// <summary> | |
/// Custom attribute to display a drop-down list containing localized Terms. | |
/// | |
/// Usage: | |
/// | |
/// class Foo : ScriptableObject | |
/// { | |
/// [LocID] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "ShieldShader" | |
{ | |
Properties | |
{ | |
_Globalopacity("Global opacity", Range( 0 , 1)) = 1 | |
_Maintexture("Main texture", 2D) = "black" {} | |
_Maintextureintensity("Main texture intensity", Float) = 1 | |
_Mainpanningspeed("Main panning speed", Vector) = (0,0,0,0) | |
[Toggle]_Invertmaintexture("Invert main texture", Range( 0 , 1)) = 0 | |
[HDR]_Maincolor("Main color", Color) = (0.7941176,0.1284602,0.1284602,0.666) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************* | |
* 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. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* PreferenceWindow helper created by Chance Millar at Two Tails Games on 2018/07/24 | |
* Use freely. That's a license, right? | |
* | |
* Be sure to place in an Editor folder inside Assets. | |
*/ | |
using System; | |
using System.Collections; | |
using System.Reflection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if UNITY_EDITOR | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEditor.Build; | |
#if UNITY_2017 | |
class AutoHideSplashScreen : IPreprocessBuild | |
{ | |
public int callbackOrder { get { return 0; } } | |
public void OnPreprocessBuild(BuildTarget target, string path) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.EventSystems; | |
public class EventSystemManaged : EventSystem | |
{ | |
static Stack<EventSystem> ms_PrevEventSystem = new Stack<EventSystem>(); | |
static bool ms_Forced = false; | |
protected override void OnEnable() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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 |