View DualDisplay.cs
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; | |
using System.Collections; | |
/* | |
Runtime use: | |
To be available, AirPlay needs to be switched on for the device either via a native AirPlay UI component or | |
via the global AirPlay mirroring setting. Your options are: | |
A: Modify your Xcode project to layer a native AirPlay Cocoa control somewhere over your Unity content. |
View MissingHassModule.sh
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/env bash | |
set -euo pipefail | |
serviceName="home-assistant.service" | |
startTime=$(systemctl show -p ActiveEnterTimestamp "$serviceName") | |
startTime=$(echo $startTime | awk '{print $2 $3}') | |
echo "Missing modules reported since $serviceName start at $startTime:" |
View Build.sh
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
mcs -target:library -out:MyAssembly.dll -r:/Applications/Unity/Unity.app/Contents/Frameworks/UnityEngine.dll MyAssembly.cs |
View Drawer.cs
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; | |
using UnityEditor; | |
using UnityEditorInternal; | |
using UnityEngine.Events; | |
using System.Reflection; | |
namespace Test | |
{ | |
[CustomPropertyDrawer (typeof (UnityEventBase), true)] |
View Multiply.cs
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; | |
using System.Collections; | |
public class Multiply : MonoBehaviour | |
{ | |
public Camera source, destination; | |
private RenderTexture renderTexture; |
View TerriblyHackyLog.cs
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; | |
using System.Reflection; | |
public class TerriblyHackyLog : MonoBehaviour | |
{ | |
void Start () | |
{ | |
Log ("Aaaaarrrrgh!"); | |
} |
View TotalBounds.cs
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
private Bounds bounds; | |
void Start () | |
{ | |
bounds = new Bounds (transform.position, Vector3.one); | |
Renderer[] renderers = GetComponentsInChildren<Renderer> (); | |
foreach (Renderer renderer in renderers) | |
{ | |
bounds.Encapsulate (renderer.bounds); |
View user-callback
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 | |
# Copyright (c) 2012-2015 Germar Reitze | |
# Mount/unmount implementation 2019 Emil "AngryAnt" Johansen | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
View EditorWindowExample.cs
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; | |
using UnityEditor; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class EditorWindowExample : EditorWindow | |
{ | |
List<Node> nodes = new List<Node> (); |
View MultiScene.cs
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; | |
using UnityEditor; | |
using System.IO; | |
public class MultiScene | |
{ | |
[MenuItem ("File/Combine Scenes")] | |
static void Combine () | |
{ |
NewerOlder