Skip to content

Instantly share code, notes, and snippets.

View VirtualMaestro's full-sized avatar

VirtualMaestro VirtualMaestro

  • Germany, Hamburg
View GitHub Profile
@VirtualMaestro
VirtualMaestro / SimpleHTTPServer.cs
Created April 17, 2022 11:21 — forked from aksakalli/SimpleHTTPServer.cs
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;
/*
Helper script for loading all prefabs in a directory to a List
Not completely by me, found from: https://gist.github.com/HilariousCow/7f301b04c28fdf61e71f
With some modifications to return GameObjects instead of Components
*/
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.IO;
@VirtualMaestro
VirtualMaestro / gist:db5431a9bf4747b4349257e9c10d7637
Created June 21, 2020 17:29 — forked from allanolivei/gist:9260107
Unity 3d : Get Selected Folder in Project Window
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.IO;
public static class UnityUtil
{
public static string GetSelectedPathOrFallback()
{
string path = "Assets";
@VirtualMaestro
VirtualMaestro / CameraConstantWidth.cs
Created May 12, 2020 14:33 — forked from Glavak/CameraConstantWidth.cs
Скрипт для поддержания постоянной ширины камеры в Unity, для туториала https://youtu.be/0cmxFjP375Y
using UnityEngine;
/// <summary>
/// Keeps constant camera width instead of height, works for both Orthographic & Perspective cameras
/// Made for tutorial https://youtu.be/0cmxFjP375Y
/// </summary>
public class CameraConstantWidth : MonoBehaviour
{
public Vector2 DefaultResolution = new Vector2(720, 1280);
[Range(0f, 1f)] public float WidthOrHeight = 0;
@VirtualMaestro
VirtualMaestro / BuildAutomation.cs
Created May 9, 2020 08:44 — forked from simonbroggi/BuildAutomation.cs
Build mutliple Unity applications for multiple platforms with one click
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class BuildAutomation {
public struct BuildTargetAndGroup {
public BuildTargetGroup group;
public BuildTarget target;
[winUpdater]
recentlySeenVersion = 2.24.0.windows.2
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[push]
default = simple
[core]
@VirtualMaestro
VirtualMaestro / Program.cs
Created September 21, 2019 19:58
Test Leo Ecs2
using System;
using System.Diagnostics;
namespace Ecs2
{
internal class Program
{
class C1 {
public float a;
public float b;