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
// @NOTE(BDJ): Resources: | |
// - ARM ABI: https://github.com/ARM-software/abi-aa (see "Procedure Call Standard for the Arm 64-bit Architecture") | |
// - Apple's ARM64 ABI: https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms | |
// - ARM instruction reference: https://developer.arm.com/documentation/dui0802/b/A64-General-Instructions | |
// - clang/GNU assembler syntax reference: https://developer.arm.com/documentation/100068/0622/Migrating-from-armasm-to-the-armclang-Integrated-Assembler/Overview-of-differences-between-armasm-and-GNU-syntax-assembly-code | |
// | |
// There are a few minor assembler syntax differences compared to NASM: | |
// | |
// - all label names have to be unique--including loop labels | |
// - no leading `.` in front of labels |
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
{ | |
// Set `BAKE_OS` to the lowercase, shorthand OS name that matches what | |
// clang expects for the `sys` portion of the "target triple." See | |
// clang's cross-compilation docs for more info: | |
// https://clang.llvm.org/docs/CrossCompilation.html | |
// Set `BAKE_ARCHITECTURE` to the target architecture (the `arch` portion | |
// of clang's target triple). To compile for multiple architectures, build | |
// them one by one and use the `lipo` tool to merge them together. |
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
Show hidden characters
{ | |
"shell_cmd": "bake", // https://github.com/SanderMertens/bake | |
"keyfiles": [ "project.json" ], | |
"working_dir": "${project_path:${folder}}", | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
// The ANSIescape package (installed via Package Control) is | |
// required to support the ANSI escape colour codes used by | |
// the Bake build system. Without it, Sublime's console is | |
// littered with visible escape codes like "<0x1b>". |
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
// This script is published under the CC0 1.0 Universal License | |
// https://creativecommons.org/publicdomain/zero/1.0/ | |
// To the extent possible under law, Spryly® Ltd. has waived all copyright | |
// and related or neighboring rights to this script. This work is published from: Canada. | |
using UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
public static class SetConstantTangents { |
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 UnityEditor; | |
using System.Collections; | |
public class TakeScreenshot : ScriptableObject { | |
[MenuItem ("Assets/Screenshot/Capture 1X")] | |
static public void CaptureScreenshot1X() { | |
Application.CaptureScreenshot( "Screenshot1X.png" ); | |
} |
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
public void ForcedFullGarbageCollection() { | |
var size = GC.GetTotalMemory(false); | |
for (var i = 0; i < 100; ++i) { | |
GC.Collect(); | |
GC.WaitForFullGCComplete(); | |
GC.WaitForPendingFinalizers(); | |
var newSize = GC.GetTotalMemory(false); | |
var delta = (size - newSize) / (double)size; | |
if (delta < 0.01) | |
break; |