Skip to content

Instantly share code, notes, and snippets.

@flarb
flarb / SDKSwap.cs
Created May 23, 2015 18:50
Swap between Unity3D Google Cardboard and Gear VR / OVR Mobile SDKs. It swaps out the Android manifest files when you switch platforms--pretty much all you need (aside from wrapping the APIs) to switch platforms.
using UnityEngine;
using System.Collections;
using UnityEditor;
using System.IO;
public class SDKSwap : EditorWindow {
static string _cardboardPath;
static string _OVRPath;
@mattbenic
mattbenic / SpecificInstanceOfGameExample.cs
Last active June 11, 2023 14:40
Example of using Win32 API to get specific window instance in Unity. This is useful for when running multiple instances of the same application, as the window handle can then be used to correctly position and size the different windows for multi screen use.
using UnityEngine;
using System;
using System.Runtime.InteropServices;
using System.Text;
public class SpecificInstanceOfGameExample : MonoBehaviour
{
#region DLL Imports
private const string UnityWindowClassName = "UnityWndClass";
@aksakalli
aksakalli / SimpleHTTPServer.cs
Last active June 7, 2024 08:38
SimpleHTTPServer in C#
// MIT License - Copyright (c) 2016 Can Güney Aksakalli
// https://aksakalli.github.io/2014/02/24/simple-http-server-with-csparp.html
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
using System.IO;