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
// Simply ascii .ply mesh exporter made because I couldn't find one anywhere | |
// https://www.mathworks.com/help/vision/ug/the-ply-format.html | |
using System; | |
using System.IO; | |
using System.Text; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; |
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
// The only way I know to get the _actual_ bounds of a rect transform, including canvas scalers and transforms. | |
// rectTransform.sizeDelta is fucked, not very useful | |
// image.sprite.bounds doesn't include transform or canvas scale. fuck that | |
// rectTransform.GetWorldCorners apparently does raycasts internally? so that's probably why it works. | |
public static Bounds ToScreenBounds(RectTransform transform, Camera uiCamera) | |
{ | |
Bounds bounds = new Bounds(); | |
bounds.min = Vector3.one * 100000.0f; | |
bounds.max = Vector3.one * -100000.0f; |
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
import bpy | |
from math import pi | |
from mathutils import Euler | |
import os | |
import shutil | |
input_dir = "svgs" | |
export_dir = input_dir + "_out" | |
# 12 is the default quality | |
quality = 4 |
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
#signs an apk with a keystore (even if it's already been signed) | |
#example use: sh sign.sh builds/android.apk metro.keystore | |
APK_PATH=$1 | |
KEYSTORE_PATH=$2 | |
if [ ! -e "$APK_PATH" ] | |
then | |
echo "could not find apk at path $APK_PATH" | |
exit | |
fi |
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
public delegate float GetItemWeight<T>(T item); | |
public static T GetWeightedRandom<T>(List<T> list, GetItemWeight<T> getItemWeight) | |
where T : class | |
{ | |
float accumulator = 0.0f; | |
for (int n = 0; n < list.Count; ++n) | |
{ | |
float weight = getItemWeight(list[n]); |
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
public class Extensions | |
{ | |
private Context context; | |
public Extensions(Context context) | |
{ | |
this.context = context; | |
} | |
public void RestartApp() |
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
package com.unity3d.plugin.obbExtensions; | |
import android.content.Context; | |
import android.content.pm.PackageInfo; | |
import android.content.pm.PackageManager; | |
import java.io.*; | |
public class Extensions | |
{ |
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
component Transform { | |
Vector3 position; | |
Quaternion rotation; | |
Vector3 scale; | |
} | |
component Sprite { | |
Texture texture; | |
} | |
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
D:\Development\XXXX\firebase\functions>firebase serve --only functions --debug | |
[2017-09-04T06:04:04.025Z] ---------------------------------------------------------------------- | |
[2017-09-04T06:04:04.028Z] Command: D:\Program Files\nodejs\node.exe C:\Users\Flynn\AppData\Roaming\npm\node_modules\firebase-tools\bin\firebase serve --only functions --debug | |
[2017-09-04T06:04:04.028Z] CLI Version: 3.9.2 | |
[2017-09-04T06:04:04.029Z] Platform: win32 | |
[2017-09-04T06:04:04.029Z] Node Version: v7.9.0 | |
[2017-09-04T06:04:04.030Z] Time: Mon Sep 04 2017 16:04:04 GMT+1000 (AUS Eastern Standard Time) | |
[2017-09-04T06:04:04.030Z] ---------------------------------------------------------------------- | |
[2017-09-04T06:04:04.041Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"] |
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
//GameManager.h | |
void refreshWalls(int NewLevel) | |
//GameManager.cpp | |
void GameManager::refreshWalls(int NewLevel) { |
NewerOlder