Skip to content

Instantly share code, notes, and snippets.

View vad710's full-sized avatar
🎯
Focusing

Vinny vad710

🎯
Focusing
View GitHub Profile
@AngryAnt
AngryAnt / ComponentLister.cs
Created September 29, 2012 17:52
Example code for "Where did that component go?" blog post on AngryAnt.com
using UnityEngine;
using UnityEditor;
using System.Collections;
public class ComponentLister : EditorWindow
{
private Hashtable sets = new Hashtable();
private Vector2 scrollPosition;
@AngryAnt
AngryAnt / TerriblyHackyLog.cs
Created August 7, 2013 18:04
Abusing reflection and the internal Unity player build error function to get stacktrace-less error logs. Not recommended for anything sane.
using UnityEngine;
using System.Reflection;
public class TerriblyHackyLog : MonoBehaviour
{
void Start ()
{
Log ("Aaaaarrrrgh!");
}
@dlidstrom
dlidstrom / run-jasmine.js
Last active January 3, 2016 07:49
Runs Jasmine tests using PhantomJS. Adapted for use within TeamCity.
var system = require('system'),
env = system.env;
/**
* Wait until the test condition is true or a timeout occurs. Useful for waiting
* on a server response or for a ui change (fadeIn, etc.) to occur.
*
* @param testFx javascript condition that evaluates to a boolean,
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or
* as a callback function.
@ChemiKhazi
ChemiKhazi / EnumFlagAttribute.cs
Created April 29, 2014 09:59
Unity3d property drawer for automatically making enums flags into mask fields in the inspector.
using UnityEngine;
public class EnumFlagAttribute : PropertyAttribute
{
public string enumName;
public EnumFlagAttribute() {}
public EnumFlagAttribute(string name)
{
Function WSUSUpdate {
$Criteria = "IsInstalled=0 and Type='Software'"
$Searcher = New-Object -ComObject Microsoft.Update.Searcher
try {
$SearchResult = $Searcher.Search($Criteria).Updates
if ($SearchResult.Count -eq 0) {
Write-Output "There are no applicable updates."
exit
}
else {
@creativcoder
creativcoder / gist:5dc5c2e35cd218ce9b5d
Last active August 22, 2022 14:41
Get list of installed packages(apps) in android via adb shell
Issue this command to terminal with your device connected :
$ adb shell pm list packages
If that doesn't work, then:
$ adb shell
$ su
$ pm list packages
@terrehbyte
terrehbyte / UsefulUnityAssets.md
Last active March 28, 2024 22:35
Useful Open-Source Unity Assets

Useful Open-Source Unity Assets

This is a compilation of various open-source Unity plugins, codebases, or utility scripts that may aid in expediting the development process.

Art / Design Tools

ProbePolisher - Light Probe Editor - keijiro

"ProbePolisher is a Unity Editor plugin for editing light probes. It works both on Unity Basic (free) and Unity Pro."

Code
Releases

@jbevain
jbevain / README.md
Last active November 16, 2023 12:11
pdb2mdb for Visual Studio 2015

The Visual Studio Tools for Unity are able to convert .NET debug symbol files (namely pdb files) to debug symbols files that are understood by Unity's scripting engine (namely .dll.mdb files) when importing both the .dll and the .pdb in the Assets folder.

If you prefer to handle the conversion yourself you need to call a tool named pdb2mdb on the .dll associated with the .pdb:

pdb2mdb MyLibrary.dll

Will produce a MyLibrary.dll.mdb usable on Unity if MyLibrary.pdb is present.

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class CompanionCamera : MonoBehaviour {
// Debug shortcut keys:
public KeyCode modifier;
public KeyCode toggleButton;
// If true, this will permanently disable the SteamVR companion camera.
using UnityEngine;
using System.Collections;
public class LinkedCamera : MonoBehaviour {
// What transform to chase:
public Transform target;
// Debug keyboard controls:
public KeyCode modifier;
public KeyCode incSmooth;