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
/* | |
* Copyright (c) 2020 Muhammad Faiz <[email protected]> | |
* | |
* This library is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public | |
* License as published by the Free Software Foundation; either | |
* version 3 of the License, or (at your option) any later version. | |
* | |
* This library is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Android; | |
using Mediapipe.Unity; | |
using Mediapipe.Unity.IrisTracking; | |
using TMPro; |
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 System.Linq; | |
using System.Threading.Tasks; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; |
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
for data in $(gcloud compute disks list --format="csv[no-heading](NAME,LOCATION)"); do $(gcloud compute images create ${data%%,*} --source-disk="${data%%,*}" --source-disk-zone="${data#*,}" --storage-location=asia-southeast1); done; |
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; | |
public class ConvertTextureToPng | |
{ | |
const string MenuName = "Assets/Save Texture to png"; | |
[MenuItem(MenuName)] | |
public static void SaveRTToFile() | |
{ |
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.Collections; | |
using System.Collections.Generic; | |
#if UNITY_EDITOR_WIN || UNITY_WEBGL | |
using System.Runtime.InteropServices; | |
#endif | |
using UnityEngine; | |
public static class CursorLock |
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
npm i -g eol-converter-cli | |
for /F "usebackq delims=" %i in (`git ls-files -m`) do (eolconverter lf "%i") |
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
// origin : Transparent Unity App! : Code Monkey : https://www.youtube.com/watch?v=RqgsGaMPZTw | |
using UnityEngine; | |
using UnityEditor.Build; | |
using UnityEditor.Build.Reporting; | |
public class TransparentWindowSetting : IPreprocessBuildWithReport | |
{ | |
public int callbackOrder => 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
// Modified from: http://wiki.unity3d.com/index.php/TextureScale#TextureScale.cs | |
// Only works on ARGB32, RGB24 and Alpha8 textures that are marked readable | |
using UnityEngine; | |
public class TextureScale { | |
private static Color[] texColors; | |
private static Color[] newColors; | |
private static int w; |
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 System.Linq; | |
using System.Text.RegularExpressions; | |
public static class RegexFormatter | |
{ | |
static readonly Regex FormatterPattern = new Regex(@"\{([^\{\}]+?)(?:\:([^\{\}]*))?\}",RegexOptions.Multiline); | |
public static string RegexFormat(this string input,Func<string,object> selector) | |
{ | |
return FormatterPattern.Replace(input,(match) => { |
NewerOlder