This file contains hidden or 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
| # Create multiple copies of the $file in the same directory | |
| # For example: | |
| # clonefile.ps1 test01.txt 3 --> test02.txt, test03.txt | |
| # clonefile.ps1 test0.png 4 --> test1.png, test2.png, test3.png | |
| param([string]$file, [int]$count) | |
| if (-Not ($file -match "\d+") ) { | |
| "File should contain starting number, for example image020.png" | |
| exit; | |
| } |
This file contains hidden or 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
| for %f in (card*.png) do magick frame.png %~nf.png -composite result/%~nf.png |
This file contains hidden or 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
| // Iterate all folders inside resources/img/source/ | |
| // Pack all images inside each folder with TexturePacker | |
| // Put each individual spritesheet into resources/img/output (spritesheet name = folder name) | |
| // Example: | |
| // Source folders: resources/img/source/level1, resources/img/source/level2, resources/img/source/level3 ==> | |
| // Output: resources/img/output/level1.json + png, resources/img/output/level2.json + png, resources/img/output/level3.json + png | |
| const sh = require("shelljs"); | |
| sh.pushd("resources/img/source/"); | |
| sh.ls("-d", "*").forEach( |
This file contains hidden or 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; | |
| public class PlayerPrefsDateTime { | |
| public static DateTime GetDateTime(string key, DateTime defaultValue = default(DateTime)) { | |
| if (PlayerPrefs.HasKey(key)) { | |
| string stringValue = PlayerPrefs.GetString(key); | |
| long longValue = Convert.ToInt64(stringValue); | |
| return DateTime.FromBinary(longValue); | |
| } |
This file contains hidden or 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
| license: MIT |
This file contains hidden or 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": "test", | |
| "version": "1.0.0", | |
| "lockfileVersion": 1, | |
| "requires": true, | |
| "dependencies": { | |
| "@types/lodash": { | |
| "version": "4.14.98", | |
| "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.98.tgz", | |
| "integrity": "sha512-nVCBlQnsTw+769CM5Xt3jR/UAje48DLqEVQVtPLOILOR2AhCmZJ+LEefmbLVspm9U8YhNnT4afAtDsnIZpLogw==" |
This file contains hidden or 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/bash | |
| sudo apt-get update | |
| sudo apt-get install \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| curl \ | |
| software-properties-common | |
This file contains hidden or 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
| const DEBUG = false; | |
| const logDebug = function(_target: any, key: string, descriptor: PropertyDescriptor): any { | |
| const originalMethod = descriptor.value; | |
| descriptor.value = function(...args: any[]) { | |
| const functionName = key; | |
| console.log(functionName + "(" + args.join(", ") + ")"); | |
| const result = originalMethod.apply(this, args); | |
| console.log("=> " + result); | |
| return result; |
This file contains hidden or 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
| { | |
| "PublicClass": { | |
| "prefix": "clazz", | |
| "body": [ | |
| "export default class $TM_FILENAME_BASE {", | |
| "\tconstructor() {", | |
| "\t}", | |
| "}", | |
| "" | |
| ], |
This file contains hidden or 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.Linq; | |
| using UnityEditor; | |
| using UnityEngine; | |
| public abstract class SingletonScriptable<T> : ScriptableObject where T : ScriptableObject | |
| { | |
| static T _instance = null; | |
| public static T instance | |
| { | |
| get |