Skip to content

Instantly share code, notes, and snippets.

View doggan's full-sized avatar

Shyam Guthikonda doggan

View GitHub Profile
@doggan
doggan / CloudBundle.cs
Created March 10, 2017 02:37 — forked from rcavallari/CloudBundle.cs
Unity C# script to let Unity Cloud Build create bundles and upload them to some server
using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using AssetBundles; // Require AssetBundleManager available here https://www.assetstore.unity3d.com/en/#!/content/45836
// Place this file in Editor filder
public class CloudBundle{
[PostProcessBuildAttribute(1)]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) {
@doggan
doggan / webglmem.js
Created May 2, 2017 23:26
Unity WebGL Memory Usage
// Ref: http://developers.kongregate.com/blog/unity-webgl-memory-and-performance-optimization
setInterval(function() {
if (typeof TOTAL_MEMORY !== 'undefined') {
try {
var totalMem = TOTAL_MEMORY/1024.0/1024.0;
var usedMem = (TOTAL_STACK + (STATICTOP - STATIC_BASE) +
(DYNAMICTOP - DYNAMIC_BASE))/1024.0/1024.0;
console.log('Memory stats - used: ' + Math.ceil(usedMem) + 'M' +
' free: ' + Math.floor(totalMem - usedMem) + 'M');
} catch(e) {}
@doggan
doggan / CloudBundle.cs
Created June 16, 2017 19:56 — forked from chatpongs/CloudBundle.cs
Unity C# script to let Unity Cloud Build create bundles and upload them to some server
using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using AssetBundles; // Require AssetBundleManager available here https://www.assetstore.unity3d.com/en/#!/content/45836
// Place this file in Editor filder
public class CloudBundle{
[PostProcessBuildAttribute(1)]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) {
@doggan
doggan / TestOverlayAudio.java
Created June 23, 2017 00:57
Use MediaMuxer to overlay a WAV onto an MP4
package com.test.mytest;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.ByteBuffer;
import android.app.ProgressDialog;
import android.media.MediaCodec;