Skip to content

Instantly share code, notes, and snippets.

View LuviKunG's full-sized avatar

Thanut Panichyotai LuviKunG

View GitHub Profile
@LuviKunG
LuviKunG / SecretOfGrindeaMathPuzzleSolver.cs
Last active March 11, 2023 15:02
This is Secrets of Grindea App Instance Main Class. Using for solve the endless math dungeon puzzle in the game.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LuviKunG
{
/// <summary>
/// This is Secrets of Grindea App Instance Main Class.
/// Using for solve the endless math dungeon puzzle in the game.
@LuviKunG
LuviKunG / install_apk.bat
Last active January 18, 2023 04:52
Batch file that easily to select the *.apk files in the directory and install via 'adb'.
@echo off
setlocal enabledelayedexpansion
set i=0
for %%f in (*.apk) do (
set /A i+=1
set apk[!i!]=%%f
)
echo Available APK files:
for /L %%i in (1,1,%i%) do echo [%%i] !apk[%%i]!
set /p index=Enter the index of the APK file you want to install:
@LuviKunG
LuviKunG / logic.js
Created January 5, 2023 23:25
My experiment of working on logic gates in Javascript.
var xor = (...args) => {
let x = [];
for (let i = 0; i < args.length; i++) {
let y = [];
for (let j = 0; j < args.length; j++)
y.push(i == j ? args[j] : !args[j]);
x.push(and(...y));
}
let w = and(...args);
return or(...x, w);
@LuviKunG
LuviKunG / clean-full.bat
Created January 5, 2023 05:37
This is Windows batch file that will clean up unimportant files in the Unity project's folder.
@echo off
echo Deleting all files in the 'Library' folder.
del /s /q /f "Library/"
rd /s /q "Library/"
echo Deleting all files in the 'Logs' folder.
del /s /q /f "Logs/"
rd /s /q "Logs/"
echo Deleting all files in the 'obj' folder.
del /s /q /f "obj/"
rd /s /q "obj/"
@LuviKunG
LuviKunG / upm.bat
Created January 5, 2023 05:34
This is Windows batch file that I used for commit UPM package version on git repository.
@echo off
set packageFolder="Your package folder in unity Assets folder"
set /p version=Enter Version:
echo %version%
git subtree split --prefix="Assets/%packageFolder%" --branch upm
git tag %version% upm
pause
@LuviKunG
LuviKunG / ScriptingDefineSymbols.cs
Created December 23, 2022 05:33
Manageable instance class of scripting define symbols group.
using System.Collections.Generic;
/// <summary>
/// Manageable instance class of scripting define symbols group.
/// </summary>
public sealed class ScriptingDefineSymbols
{
private const char SDS_SEPARATOR = ';';
private HashSet<string> m_list;
@LuviKunG
LuviKunG / CSVReader.cs
Last active May 19, 2022 05:25
CSV Reader and Table Data. (by LuviKunG)
using System.Collections.Generic;
using System.IO;
using System.Text;
/*
CSV Reader (with parser).
Created by @LuviKunG
https://github.com/LuviKunG
https://gist.github.com/LuviKunG
*/
@LuviKunG
LuviKunG / SerializedDictionary.cs
Last active August 3, 2023 18:13
Serializable Dictionary for Unity (by LuviKunG)
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// Serializable Dictionary for Unity (by LuviKunG)
// https://gist.github.com/LuviKunG
namespace LuviKunG.Serializables
{
@LuviKunG
LuviKunG / UnityEditorMenuExtension.cs
Last active February 10, 2025 02:34
Unity Editor Menu Tweaks for easy access to persistent folder and project assets folder.
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace LuviKunG
{
/// <summary>
/// Unity Editor Menu Extension.
/// </summary>
public static class UnityEditorMenuExtension
@LuviKunG
LuviKunG / SimpleCharacterController.cs
Created March 9, 2022 16:37
Simple Character Controller using in Unity Engine with new Input System.
using UnityEngine;
using UnityEngine.InputSystem;
namespace Prototype
{
[RequireComponent(typeof(CharacterController))]
public sealed class SimpleCharacterController : MonoBehaviour
{
[SerializeField]
private CharacterController m_characterController = default;