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 UnityEngine; | |
/// <summary> | |
/// This is a generic Singleton implementation for Monobehaviours. | |
/// Create a derived class where the type T is the script you want to "Singletonize" | |
/// Upon loading it will call DontDestroyOnLoad on the gameobject where this script is contained | |
/// so it persists upon scene changes. | |
/// </summary> | |
/// <remarks> |
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
name: Format check on pull request | |
on: pull_request | |
jobs: | |
dotnet-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2.2.0 | |
with: | |
fetch-depth: 0 |
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
[MenuItem("AssetBundles/Print all Asset Bundle names")] | |
static void PrintAssetBundlesToDebugConsole() | |
{ | |
var sb = new StringBuilder(); | |
var globalTimer = new Stopwatch(); | |
var timer = new Stopwatch(); | |
globalTimer.Start(); | |
timer.Start(); |
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
# Adds timestamps to logs | |
# put it at the end of environment.rb | |
module ActiveSupport | |
class BufferedLogger | |
def add(severity, message = nil, progname = nil, &block) | |
return if @level > severity | |
message = (message || (block && block.call) || progname).to_s | |
level = { | |
0 => "DEBUG", |
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
# we don't want to link static libs or it will fail to build | |
# see https://github.com/CocoaPods/CocoaPods/issues/117 | |
targets = [:target1, :target2] | |
lib_dependencies = ['z'] | |
post_install do |installer| | |
installer.libraries.select { |i| targets.include? i.target_definition.name.to_sym }.each do |l| | |
config_file_path = l.library.xcconfig_path | |
config_file_contents = File.read(config_file_path) | |
NewerOlder