View JsonSerializer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using FullSerializer; | |
namespace SDD.Serializers { | |
public static class JsonSerializer { | |
/// <summary> | |
/// Static Serializer Instance | |
/// </summary> |
View WaitForExample.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Avoid GC when coroutines wait, instantiate outside of loop | |
WaitForSeconds shortWait = new WaitForSeconds(1.0f); | |
private IEnumerator Run() { | |
while (true) { | |
// do stuff here | |
yield return shortWait; | |
} | |
} |
View basic_moai_helper.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pathname' | |
require 'rbconfig' | |
require 'fileutils' | |
module BasicMoai | |
ROOT_FOLDER = File.expand_path(File.join(File.dirname(__FILE__), "..")) | |
SRC_FOLDER = File.join(ROOT_FOLDER, "src") | |
VENDOR_FOLDER = File.join(ROOT_FOLDER, "vendor") | |
TMP_FOLDER = File.join(ROOT_FOLDER, "tmp") |
View openfl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
haxelib run openfl $@ |
View JsonSerializerBinderTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System; | |
using System.Reflection; | |
using System.Collections.Generic; | |
using System.Text.RegularExpressions; | |
using System.Runtime.Serialization.Formatters; | |
using System.Linq; | |
using NUnit.Framework; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Serialization; |
View code.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module BasicUnity | |
class Code < Thor | |
namespace :code | |
include Thor::Actions | |
desc "prune", "Remove empty folders and Unity meta files that point to empty folders" | |
method_option "dry-run", :type => :boolean, :desc => "Show what will happen but don't 'rmdir' or 'rm'" | |
def prune(folder=nil) | |
# bash version, requires GNU find |
View ScreenCapture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Take up to 10 screenshots per session, then start overwriting | |
private IEnumerator Capture(string path=null, string filename=null) { | |
Log.Debug(string.Format("ScreenCapture.Capture(path: {0}, filename: {1}) Settings.DataPath={0}", path, filename, Settings.DataPath)); | |
screenShotCount += 1; | |
if (screenShotCount > 10) { | |
screenShotCount = 1; | |
} | |
if (filename == null) { |
View Settings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// The root data folder. Used by the entire application to read and write | |
/// data, not just used by the Settings class. This is an absolute path. | |
/// </summary> | |
#if UNITY_EDITOR | |
// Each product has its own folder in tmp when running in the editor. | |
// This allows audio and other debug settings to be separate from | |
// standalone builds on the same development machine. | |
// NOTE: The hard-coded forward slash should work on Windows, Linux, and OSX. | |
public static string DataPath = System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), "tmp/settings/" + Application.productName); |
View Shortcuts.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
using UnityTest; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
namespace SDD.Editor { | |
/// <summary> |
OlderNewer