Skip to content

Instantly share code, notes, and snippets.

View EliCDavis's full-sized avatar
👹
In another reality

Eli Davis EliCDavis

👹
In another reality
View GitHub Profile
@EliCDavis
EliCDavis / ReferenceFinder.cs
Last active July 1, 2019 18:37 — forked from ffyhlkain/ReferenceFinder.cs
A reference finder for assets in a #Unity3d project.
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnityEditor;
using UnityEngine;
using Debug = UnityEngine.Debug;
using Object = UnityEngine.Object;
namespace XYFoundationEditor.Editor.ReferenceFinder
{
@EliCDavis
EliCDavis / WebWindow.cs
Created January 20, 2020 13:23 — forked from drawcode/WebWindow.cs
Unity WebWindow (browser within unity editor window, helpful for tools that require a web view or more beyond basic controls).
using UnityEngine;
using UnityEditor;
using System;
using System.Reflection;
public class WebWindow : EditorWindow {
static Rect windowRect = new Rect(100,100,800,600);
static BindingFlags fullBinding = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static;
static StringComparison ignoreCase = StringComparison.CurrentCultureIgnoreCase;
@EliCDavis
EliCDavis / main.go
Created September 15, 2020 20:29
Find Windows Handle Of Application In Golang
package main
import (
"fmt"
"log"
"syscall"
"unsafe"
)
var (
@EliCDavis
EliCDavis / maximize.go
Created September 25, 2020 14:08
So it seems programs launched by your golang application are only put in the foreground if your golang application itself is in the foreground. So before launching your application, just put your golang application in the foreground first. Here's what I've done to make a program get launched in the foreground, even though the parent program is i…
package main
import (
"fmt"
"log"
"os"
"os/exec"
"syscall"
"time"
"unsafe"
@EliCDavis
EliCDavis / UploadExample.cs
Last active October 24, 2020 01:04
Example of how to upload a recording to recolude
using UnityEngine;
using Recolude;
using RecordAndPlay;
using RecordAndPlay.Record;
using System.Collections;
namespace Example
{
public class UploadExample : MonoBehaviour
{
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Recolude;
namespace Example
{
public class ScoreboardBehavior : MonoBehaviour
using UnityEngine;
using RecordAndPlay;
using RecordAndPlay.Record;
using RecordAndPlay.Playback;
using System.Collections;
using System.Collections.Generic;
using Recolude;
namespace Example
{
@EliCDavis
EliCDavis / RecurseAdd.cs
Created April 29, 2021 13:36
How to recursively add recorders to a root obj with Recolude
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RecordAndPlay.Record;
public static class RecurseExample
{
public static void RecurseAdd(Recorder recorder, GameObject obj)
{
if (recorder == null)
@EliCDavis
EliCDavis / rotations.go
Created May 12, 2021 16:42
Just my working notes with rotation for later reference
package euler
import (
"math"
"github.com/EliCDavis/vector"
)
// https://stackoverflow.com/questions/1568568/how-to-convert-euler-angles-to-directional-vector
var ui = document.querySelector("[title=Members]")
// requires the presence menu to be open (because React) but could be hidden via CSS
if ( !ui.className.match("selected") ) {
ui.dispatchEvent(new MouseEvent("click",{bubbles: true, cancellable: true}))
}
//ui.nextSibling.style.display = "none" // hides UI if you are streaming
previousMeasures = JSON.parse( localStorage.getItem('hubs-measurements') );
if (!previousMeasures) previousMeasures = []