This file contains hidden or 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
// https://colececil.io/blog/2017/scaling-pixel-art-without-destroying-it/ | |
Shader "Custom/PixelArtShader" | |
{ | |
Properties | |
{ | |
_MainTex("Texture", 2D) = "" {} | |
} | |
SubShader |
This file contains hidden or 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; | |
using UnityEngine.EventSystems; | |
public class OnClickAnimation : MonoBehaviour, IPointerClickHandler | |
{ | |
public Animator MyAnimator; | |
public string TriggerName = "idle"; | |
private void Reset() | |
{ |
This file contains hidden or 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; | |
using UnityEditor; | |
public class RectUtils | |
{ | |
public static Rect ResizeRect(Rect rect, Handles.DrawCapFunction capFunc, Color capCol, Color fillCol, float capSize, float snap) | |
{ | |
Vector2 halfRectSize = new Vector2(rect.size.x * 0.5f, rect.size.y * 0.5f); | |
Vector3[] rectangleCorners = |
This file contains hidden or 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 | |
# Creates folders to sort files exported by Affinity Designer | |
mkdir -p images | |
mkdir -p images/2x | |
mkdir -p images/3x | |
for file in ./*2x.png | |
do | |
if [ -f "$file" ] | |
then |
This file contains hidden or 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
# =============== # | |
# Unity generated # | |
# =============== # | |
Temp/ | |
Obj/ | |
UnityGenerated/ | |
Library/ | |
Assets/AssetStoreTools* | |
# ===================================== # |
This file contains hidden or 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 | |
f=$(pwd) | |
sips --resampleWidth 57 "${f}/${1}" --out "${f}/57x57.png" | |
sips --resampleWidth 72 "${f}/${1}" --out "${f}/72x72.png" | |
sips --resampleWidth 76 "${f}/${1}" --out "${f}/76x76.png" | |
sips --resampleWidth 114 "${f}/${1}" --out "${f}/114x114.png" | |
sips --resampleWidth 120 "${f}/${1}" --out "${f}/120x120.png" | |
sips --resampleWidth 144 "${f}/${1}" --out "${f}/144x144.png" | |
sips --resampleWidth 152 "${f}/${1}" --out "${f}/152x152.png" |
This file contains hidden or 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
NSURL *appURL = [NSURL URLWithString:@"instagram://app"]; | |
if([[UIApplication sharedApplication] canOpenURL:appURL]) | |
{ | |
// Image | |
UIImage *image = [UIImage imageWithContentsOfFile:imagePath]; | |
// Post | |
[UIImageJPEGRepresentation(image, 1.0) writeToFile:[self photoFilePath] atomically:YES]; | |
NSURL *fileURL = [NSURL fileURLWithPath:[self photoFilePath]]; |
NewerOlder