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 "UI/SDF Icon" { | |
Properties { | |
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
_EdgeColor ("Edge Color", Color) = (1, 1, 1, 1) | |
_Bleed("Bleed", Range(-1, 1)) = 0 | |
_EdgeRadius("Edge Radius", Range(-1, 1)) = 0 | |
_EdgeFeather("Edge Feather", Range(0, 1)) = 0 | |
_Sharpness("Sharpness", Range(0, 2048)) = 1024 | |
[Toggle(MULTIPLY_ALPHA)] _MultiplyAlpha("Multiply Intensity by Alpha", Float) = 0 |
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 UnityEditor; | |
using UnityEditor.Build; | |
using UnityEditor.Build.Reporting; | |
using UnityEditor.U2D; | |
using UnityEngine; | |
using UnityEngine.U2D; | |
internal class TextureCompressionToggler : IPreprocessBuildWithReport, IPostprocessBuildWithReport { | |
public int callbackOrder => 2; |
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; | |
public class CornerCheat : MonoBehaviour { | |
public CircleCollider2D circle; | |
public Rigidbody2D body; | |
EdgeCollider2D edge; | |
[Range(0, .2f)] public float distanceThreshold = .03f; | |
[Range(0, 1)] public float dotThreshold = .96f; |
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.Diagnostics; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
using UnityEditor; | |
using Debug = UnityEngine.Debug; | |
/// <summary> | |
/// Unity template fixer by grapefrukt ([email protected]) | |
/// Runs a series of regexes on | |
/// </summary> |
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 2020 Martin Jonasson | |
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 |
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
// modified for usage in Unity by grapefrukt, (removed support for polygons with holes as I do not need it) | |
// based C# port of Polylabel found here: https://github.com/mapbox/polylabel/issues/26#issue-211932869 | |
// which in turn, is based on Polylabel from https://github.com/mapbox/polylabel | |
// as the name implies this is useful for placing labels on a polygon | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace Utilities { |
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; | |
public class Wave : MonoBehaviour { | |
public float stayLow = 2f; | |
public float stayHigh = 2f; | |
private void OnDrawGizmos() { | |
var p0 = Vector2.zero; | |
for (var i = 0; i < 400; i++) { |
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
#!/usr/bin/python | |
import os | |
import json | |
import google.oauth2.credentials | |
import google_auth_oauthlib.flow | |
from googleapiclient.discovery import build | |
from googleapiclient.errors import HttpError | |
from google_auth_oauthlib.flow import InstalledAppFlow |
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
#!/bin/bash | |
# making sure we're in the correct dir | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"; cd ${DIR} | |
# get the architecture | |
arch=$(uname -m) | |
# this hack is only needed on 32 bit for some reason | |
if [[ ''$arch'' == ''i686'' ]]; then | |
# make sure libraries are loaded from the local directory |
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
class Test { | |
static function main() { | |
var input = '()()(()()()(()()((()((()))((()((((()()((((()))()((((())(((((((()(((((((((()(((())(()()(()((()()(()(())(()((((()((()()()((((())((((((()(()(((()())(()((((()))())(())(()(()()))))))))((((((((((((()())()())())(())))(((()()()((((()(((()(()(()()(()(()()(()(((((((())(())(())())))((()())()((((()()((()))(((()()()())))(())))((((())(((()())(())(()))(()((((()())))())((()(())(((()((((()((()(())())))((()))()()(()(()))))((((((((()())((((()()((((()(()())(((((()(()())()))())(((()))()(()(()(()((((()(())(()))(((((()()(()()()(()(((())())(((()()(()()))(((()()(((())())(()(())())()()(())()()()((()(((()(())((()()((())()))((()()))((()()())((((()(()()(()(((()))()(()))))((()(((()()()))(()(((())()(()((()())(()(()()(()())(())()(((()(()())()((((()((()))))())()))((()()()()(())()())()()()((((()))))(()(((()()(((((((())()))()((((()((())()(()())(())()))(()(()())(((((((())))(((()))())))))()))())((())(()()((())()())()))))()((()()())(())((())((((()())())()()()(((()))())))()()))())(()() |
NewerOlder