Skip to content

Instantly share code, notes, and snippets.

View GEMISIS's full-sized avatar

Gerald McAlister GEMISIS

View GitHub Profile
@GEMISIS
GEMISIS / Coverage Badges
Last active March 20, 2021 19:50
Coverage Badges
Coverage Badges
@GEMISIS
GEMISIS / wonderful-unity-assets.md
Last active September 18, 2020 09:09
A list of awesome Unity assets everyone should check out!
@GEMISIS
GEMISIS / vid-2-gif.bat
Last active June 28, 2020 15:12
Usage: **vid-2-gif.bat input.mp4** Takes a video input and converts it into a nice, small gif. Note that you'll want to keep the video size fairly small, otherwise the gif could turn out huge! Requires FFMPEG to use!
@echo off
if [%1]==[] goto :error1
:post
set output="%~n1.gif"
echo Creating %output%...
ffmpeg -i %1 -filter_complex "[0:v] fps=12,scale=480:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" %output%
goto :done
:error1
@GEMISIS
GEMISIS / BuildAssetBundles.cs
Last active May 24, 2020 05:20
A simple script for creating and deploying Asset Bundles in Unity to Oculus builds. Currently just has 2 Asset Bundles: scenes and assets. You can update the menu items for Deploying to support alternatives as necessary.
using System;
using System.IO;
using System.Threading;
using System.Diagnostics;
using UnityEditor;
using UnityEngine;
namespace RGBSchemes
{
public class BuildAssetBundles : MonoBehaviour
@GEMISIS
GEMISIS / WorldSettings.cs
Last active July 7, 2020 01:39
Handles pausing and resuming for the Oculus platform.
using System.IO;
using UnityEngine;
using UnityEngine.Events;
#if PLATFORM_ANDROID
using UnityEngine.Android;
#endif
public class WorldSettings : MonoBehaviour
{
/// <summary>
@GEMISIS
GEMISIS / adb_wireless.bat
Created April 12, 2020 03:19
Setup an Android devices to be usable over a wireless connection instead.
@echo off
for /F "tokens=* USEBACKQ" %%F in (`adb shell getprop ro.product.model`) do (
set device_name=%%F
)
for /F "tokens=9 USEBACKQ" %%F in (`adb shell ip route`) do (
set ip_addr=%%F
)
echo Setting up wireless debugging for %device_name% at %ip_addr%...
adb tcpip 5555
adb connect %ip_addr%:5555
@GEMISIS
GEMISIS / ScreenFade.cs
Last active October 7, 2020 23:15
Updated Screen Fading with URP support. Yanked raw from a project, so may need further modifications later. As a result, no guarantees on this working properly.
using UnityEngine;
using UnityEngine.Rendering;
using System.Collections;
/// <summary>
/// An enumerator used to describe the type of fade
/// that was done for a fade event.
/// </summary>
public enum FadeType
{
@GEMISIS
GEMISIS / adb_wireless
Created August 11, 2019 05:28
Quick function to enable wireless adb connections for android devices. Disable with "adb usb".
function adb_wireless() {
ip_address=$(adb shell ip route | awk '{print $9}')
adb tcpip 5555
adb connect $ip_address:5555
}
@echo off
set /p ip="Enter IP Address: " %=%
echo Setting up wireless debugging with IP Address %ip%...
adb tcpip 5555
adb connect %ip%
echo done!
pause
@GEMISIS
GEMISIS / ScreenFade.cs
Last active September 24, 2019 20:10
Custom fade script for use with the Oculus SDK. Handles fading in and out, as well as custom callbacks for when fading completes.
/************************************************************************************
Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.3 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at