Skip to content

Instantly share code, notes, and snippets.

@li5414
li5414 / TailwindColors.cs
Created May 15, 2025 19:27 — forked from FronkonGames/TailwindColors.cs
Tailwind color palette for Unity.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// _______ _ _ _ _ _____ _
// |__ __| (_) | (_) | | / ____| | |
// | | __ _ _| |_ ___ _ __ __| | | | ___ | | ___ _ __ ___
// | |/ _` | | \ \ /\ / / | '_ \ / _` | | | / _ \| |/ _ \| '__/ __|
// | | (_| | | |\ V V /| | | | | (_| | | |___| (_) | | (_) | | \__ \
// |_|\__,_|_|_| \_/\_/ |_|_| |_|\__,_| \_____\___/|_|\___/|_| |___/
//
// An expertly-crafted color palette out-of-the-box that is a great starting point if you don’t have your
// own specific branding in mind. Based on https://tailwindcss.com/docs/customizing-colors
@li5414
li5414 / ProjectSetup.cs
Created November 18, 2024 16:42 — forked from adammyhre/ProjectSetup.cs
Automated Unity Project Setup Script
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using UnityEditor;
using UnityEditor.PackageManager;
using UnityEditor.PackageManager.Requests;
using UnityEngine;
using static System.Environment;
using System;
using System.Net;
using System.Net.Http;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.Networking;
@li5414
li5414 / PackageCreator.cs
Created May 27, 2024 06:35 — forked from xavierarpa/PackageCreator.cs
Folder to package.tgz
#if UNITY_EDITOR
using System.IO;
using UnityEditor;
using UnityEditor.PackageManager;
using UnityEditor.PackageManager.Requests;
public static class PackageCreator
{
public static void CreateTgzPackage(string packagePath, string sourcePath)
{
PackRequest packRequest = Client.Pack(sourcePath, packagePath);
@li5414
li5414 / AudioLinkUI.shader
Created February 26, 2024 09:12 — forked from pema99/AudioLinkUI.shader
AudioLinkUI V3
Shader "AudioLink/AudioLinkUI"
{
Properties
{
_Gain("Gain", Range(0, 2)) = 1.0
[ToggleUI] _Autogain("Autogain", Float) = 0.0
_Threshold0("Low Threshold", Range(0, 1)) = 0.5
_Threshold1("Low Mid Threshold", Range(0, 1)) = 0.5
_Threshold2("High Mid Threshold", Range(0, 1)) = 0.5
@li5414
li5414 / AudioLinkUI.shader
Created February 26, 2024 09:12 — forked from pema99/AudioLinkUI.shader
AudioLinkUI V3
Shader "AudioLink/AudioLinkUI"
{
Properties
{
_Gain("Gain", Range(0, 2)) = 1.0
[ToggleUI] _Autogain("Autogain", Float) = 0.0
_Threshold0("Low Threshold", Range(0, 1)) = 0.5
_Threshold1("Low Mid Threshold", Range(0, 1)) = 0.5
_Threshold2("High Mid Threshold", Range(0, 1)) = 0.5
@li5414
li5414 / resign-ipa.md
Created August 25, 2023 14:36 — forked from ryantan/resign-ipa.md
How to resign an .ipa

How to Resign an iOS App

Let's say you receive an app (e.g. MyApp.ipa) from another developer, and you want to be able to install and run it on your devices (by using ideviceinstaller, for example).

Or your certificates and provision profiles have expired and you want to provide a new build to your clients without having to make a new build on the latest XCode or iOS SDK.

Prepare New Signing Assets

The first step is to attain a Provisioning Profile which includes all of the devices you wish to install and run on. Ensure that the profile contains a certificate that you have installed in your Keychain Access (e.g. iPhone Developer: Some Body (XXXXXXXXXX) ). Download the profile (MyProfile.mobileprovision) so you can replace the profile embedded in the app.

@li5414
li5414 / MaxRectsBinPack.cs
Created March 20, 2023 07:31 — forked from samsonchen1989/MaxRectsBinPack.cs
运行时合图打包类
/*
Based on the Public Domain MaxRectsBinPack.cpp source by Jukka Jylänki
https://github.com/juj/RectangleBinPack/
Ported to C# by Sven Magnus
This version is also public domain - do whatever you want with it.
*/
using UnityEngine;
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
// This is only useful for spritesheets that need to be automatically sliced (Sprite Editor > Slice > Automatic)
public class AutoSpriteSlicer
{
[MenuItem("Tools/Slice Spritesheets %&s")]
@li5414
li5414 / PlayerAnimator.cs
Created July 21, 2022 17:27 — forked from Matthew-J-Spencer/PlayerAnimator.cs
Control unity animations using code. Video: https://youtu.be/ZwLekxsSY3Y
using System;
using UnityEngine;
using UnityEngine.Tilemaps;
using Random = UnityEngine.Random;
public class PlayerAnimator : MonoBehaviour {
[SerializeField] private float _minImpactForce = 20;
// Anim times can be gathered from the state itself, but
// for the simplicity of the video...