System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
#!/bin/sh | |
# | |
# Copyright (c) 2010 Warren Merrifield | |
# | |
# 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: |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
<?php | |
// get input | |
$receipt = $_POST['receipt']; | |
$isTest = $_POST['isTest'] == '1'; | |
// prop the post data | |
$json = json_encode( array( 'receipt-data' => $receipt ) ); |
# GDC Vault videos can't be watched on mobile devices and this is a very sad thing indeed! | |
# (Note: this has changed for GDC2013, which lets you watch raw MP4 streams. Kudos!) | |
# This script is designed to circumvent this by downloading the lecture and slideshow | |
# videos which can then be re-encoded into whatever format you wish. Obviously, you | |
# won't be able to do this without access to the Vault. This is strictly for the | |
# convenience of legitimate Vault users! | |
# Note: this code is rather flimsy and was written as fast as possible for my own personal use. | |
# The code only works for the most recent GDC Vault videos, since they all use the same player | |
# format. If the XML format used to run the player is changed (as it has in the past), the code |
// Now with more love at: | |
// https://github.com/chkn/JSON.cs/blob/master/JSON.cs |
System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
Shader "Diffuse Lightmap" { | |
Properties { | |
_MainTex ("Texture 1", 2D) = "white" {} | |
} | |
SubShader { | |
Tags { "RenderType" = "Opaque" } | |
Pass { |
//Based on a brilliant idea by Matthew Wegner - https://twitter.com/mwegner/status/355147544818495488 | |
//Code for drawing the base PropertyDrawers is from here: http://forum.unity3d.com/threads/173401-Getting-Default-SerializedProperty-Drawing-within-a-PropertyDrawer?p=1186347&viewfull=1#post1186347 | |
//My implementation is super lazy with magic numbers everywhere! :D | |
#if UNITY_EDITOR | |
using System; | |
using UnityEngine; | |
using System.Collections.Generic; | |
using UnityEditor; |
In order to take part in the Unity Activity sharing system, there are a few steps you will need to take outlined below. First, some background. You can signify which class you would like to receive all the Activity lifecycle methods. When you implement the methods they should have the exact same signature but they should be *public static void*. That is important! They will not be called if they are not public static void. You can implement 1 or all of the methods. That is entirely up to your needs. | |
1. Download the Prime31UnityActivity.jar file from here: https://app.box.com/s/xw6hq1ltjaniycc14j21 You are free to distribute the file but *do not change it's name*! That would defeat the purpose of the sharing mechanism! | |
2. Implement any of the methods that are available in this Gist (https://gist.github.com/prime31/10747997) | |
3. Perform the AndroidManifest changes below | |
If successful, on app launch you will see a log that looks like the following: |