Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
✅
‏‏‎

mika unitycoder

✅
‏‏‎
View GitHub Profile
@unitycoder
unitycoder / AlignScene.cs
Created June 21, 2016 12:17
EditorScript: Align Scene Camera to MainCamera
// http://answers.unity3d.com/answers/1137225/view.html
SceneView.lastActiveSceneView.pivot = Camera.main.transform.position;
SceneView.lastActiveSceneView.rotation = Camera.main.transform.rotation;
SceneView.lastActiveSceneView.Repaint();
@unitycoder
unitycoder / chat-frontend.js
Created June 21, 2016 04:09 — forked from martinsik/chat-frontend.js
Node.js chat frontend and server
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;
@unitycoder
unitycoder / BlinkSprite.cs
Last active November 8, 2021 17:56
Sprite Blink (duration, count) with IEnumerator
SpriteRenderer sr;
void Awake()
{
sr = GetComponent<SpriteRenderer>();
}
IEnumerator Blink(float duration, int count)
{
isBlinking = true;
# -*- coding: utf-8 -*-
'''
original source: https://gist.github.com/nioto/9343730
"A Simple mjpg stream http server for the Raspberry Pi Camera
inspired by https://gist.github.com/n3wtron/4624820 "
modified by @unitycoder, to serve random image, instead of webcam
'''
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
import io
Shader "Name" {
Properties {
name ("display name", Range (min, max)) = number
name ("display name", Float) = number
name ("display name", Int) = number
name ("display name", Color) = (number,number,number,number)
name ("display name", Vector) = (number,number,number,number)
@unitycoder
unitycoder / FPS.cs
Created May 6, 2016 07:52
GoogleCardboard FPS Counter without GarbageCollection
// Copyright 2015 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@unitycoder
unitycoder / StandardReflectionProbe.shader
Last active June 11, 2020 13:06
Unity Standard Shader - Accessing BoxProfected Reflection Probe Cubemap
// Moved most of the functions from includes into the shader
// Removed lots of unnecessary stuff (i just want the reflection probe cube)
// Still plenty to cleanup
// NEW: http://forum.unity3d.com/threads/reflection-probes-in-a-custom-surface-shader.378549/#post-2685603
// References (none of the scripts worked..)
// http://forum.unity3d.com/threads/reflection-probes-in-a-custom-surface-shader.378549/
// http://forum.unity3d.com/threads/reflection-probes-in-custom-shader.322562/
// http://forum.unity3d.com/threads/accessing-reflection-probe-cubemaps.307077/
@unitycoder
unitycoder / cardboard.txt
Created April 26, 2016 03:14
Cardboard QR codes
http://www.hypergridbusiness.com/faq/vr-headset-qr-codes/
config generator
https://www.google.com/get/cardboard/viewerprofilegenerator/
@unitycoder
unitycoder / AnimateCC-older-air-sdk-install.txt
Last active November 10, 2020 07:34
How to install old AIR SDK to Adobe Animate CC (Flash) - For example: AIR13 SDK
How to add older AIR SDK to Adobe Animate CC (Flash)
- Download old AIR SDK from https://helpx.adobe.com/air/kb/archived-air-sdk-version.html#mainArchivedAdobeAIRdownloads
- Unzip and create new folder AIR13.0/ into Animator installation folder (for example: D:\Program Files\Adobe Animate CC 2015\AIR13.0)
- Temporarily rename existing AIR20.0 folder into xxAIR20.0xx *Otherwise it didnt allow adding older versions..
- Start Animator
- Select menu Help/Manage Adobe AIR SDK..
- Click + button and add the AIR13 path (for example D:\Program Files\Adobe Animate CC 2015\AIR13.0)
- Restart Animate (if needed), check Publish settings and you should see AIR13 listed
- *You should also rename back the xxAIR20.0xx folder to its original name
http://answers.unity3d.com/questions/1085293/www-not-getting-site-that-doesnt-end-on-html.html