The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site
to .gitignore
. The generated site should not be uploaded to Github since its gets generated by github.
// NOTE: For an actively-maintained version of this script, see https://github.com/mminer/consolation. | |
using System.Collections.Generic; | |
using UnityEngine; | |
/// <summary> | |
/// A console to display Unity's debug logs in-game. | |
/// </summary> | |
public class Console : MonoBehaviour | |
{ |
The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site
to .gitignore
. The generated site should not be uploaded to Github since its gets generated by github.
#define _WIN32_WINNT 0x0500 | |
#include <windows.h> | |
#include <windowsx.h> | |
#include <GL/gl.h> | |
#include <GL/glu.h> | |
#include <dwmapi.h> | |
#pragma comment (lib, "opengl32.lib") |
// TextEncoder/TextDecoder polyfills for utf-8 - an implementation of TextEncoder/TextDecoder APIs | |
// Written in 2013 by Viktor Mukhachev <vic99999@yandex.ru> | |
// To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. | |
// You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. | |
// Some important notes about the polyfill below: | |
// Native TextEncoder/TextDecoder implementation is overwritten | |
// String.prototype.codePointAt polyfill not included, as well as String.fromCodePoint | |
// TextEncoder.prototype.encode returns a regular array instead of Uint8Array | |
// No options (fatal of the TextDecoder constructor and stream of the TextDecoder.prototype.decode method) are supported. |
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: |
//Enable this if you want it to work in NUNIT, see the test example at the bottom | |
//#define UNIT_TESTING | |
/** | |
* | |
* https://i.imgur.com/GoH9rkv.png | |
* | |
* One of the frustrating things about Unity is that there are a spate of magic methods that can be | |
* called from the runtime. They do not have an interface defined, which by itself is pretty frustrating, | |
* but it can allow some valid c# that is bad Unity mojo. Consider a private 'OnEnable' function unity |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using UnityEditor; | |
using UnityEngine; | |
public static class Misc { |
// Zero-Clause BSD (more permissive than MIT, doesn't require copyright notice) | |
// | |
// Permission to use, copy, modify, and/or distribute this software for any purpose | |
// with or without fee is hereby granted. | |
// | |
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | |
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | |
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS | |
// OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
Shader "Name" { | |
Properties { | |
name ("display name", Range (min, max)) = number | |
name ("display name", Float) = number | |
name ("display name", Int) = number | |
name ("display name", Color) = (number,number,number,number) | |
name ("display name", Vector) = (number,number,number,number) |
# Stop all containers | |
docker stop `docker ps -qa` | |
# Remove all containers | |
docker rm `docker ps -qa` | |
# Remove all images | |
docker rmi -f `docker images -qa ` | |
# Remove all volumes |