Skip to content

Instantly share code, notes, and snippets.

@joonjoonjoon
joonjoonjoon / Footsteps.cs
Last active March 18, 2026 00:13 — forked from WickedJumper/Footsteps.cs
Multi-surface footsteps audio script for Unity's Viking Village
/* ======================================================================================== */
/* FMOD Studio - Unity Integration Demo. */
/* Firelight Technologies Pty, Ltd. 2012-2016. */
/* Liam de Koster-Kjaer */
/* */
/* Use this script in conjunction with the Viking Village scene tutorial and Unity 5.4. */
/* http://www.fmod.org/training/ */
/* */
/* 1. Import Viking Village asset package */
/* 2. Import FMOD Studio Unity Integration package */
@joonjoonjoon
joonjoonjoon / ICNSGenerator.cs
Last active February 25, 2026 09:20
ICNS icon resizer/generator for use in Unity editor scripting.
// ICNS icon resizer/generator for use in Unity editor scripting.
// The icon is grabbed from the Player settings main icon, which should be at least 512x512 and square.
// you should change the Output folder to whatever makes sense in your project
// Based on info found in this gist: https://gist.github.com/ansarizafar/6fa64f44aa933794c4d6638eec32b9aa
// - made by joon - feb 9 2024 (joon.be / @joonturbo) - no warranty
// How to use:
// Call ICNSGenerator.Generate();
using System.Collections.Generic;
@joonjoonjoon
joonjoonjoon / jenkinsfile
Created May 9, 2025 16:11
Docker and Jenkins activation woes (Unity Personal license)
withCredentials([
usernamePassword(credentialsId: 'unity_joon', usernameVariable: 'UNITY_CREDENTIALS_USR', passwordVariable: 'UNITY_CREDENTIALS_PSW'),
string(credentialsId: 'unity_serial', variable: 'UNITY_SERIAL')
]) {
unityImage.withRun("--privileged") { c ->
unityImage.inside("""
-v ${WORKSPACE}:/project
-v ${WORKSPACE}${OUTPUTPATH}:/build
-v /var/jenkins_home/.unity3d:/var/jenkins_home/.unity3d
-e UNITY_CONFIG_PATH=/project/.config/unity3d
@joonjoonjoon
joonjoonjoon / CloudBuildAPI.cs
Created January 26, 2016 13:50
set iOS build version to CloudBuild version
namespace UnityEngine.CloudBuild.API
{
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_CLOUD_BUILD
using UnityEditor;
Available stats:
Ai - Carving.ApplyResults - TimeNanoseconds
Ai - Carving.BuildBVTree - TimeNanoseconds
Ai - Carving.Clipping - TimeNanoseconds
Ai - Carving.ConvexHulls - TimeNanoseconds
Ai - Carving.Prepare - TimeNanoseconds
Ai - Carving.ProjectVertices - TimeNanoseconds
Ai - CollectSources - TimeNanoseconds
Ai - Colliders - TimeNanoseconds
Ai - Components.NavMeshAgent.SendMessage - TimeNanoseconds
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor.AddressableAssets.Settings;
using UnityEditor.SceneManagement;
using UnityEngine;
// !!!! this needs to be in a folder with an Assembly Defintion Reference file,
// which refers to Addressables.Editor
// After that it should be accessible from the Addressables > Analyze window
using System.Collections;
using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;
using TastyTools;
using UnityEngine;
using UnityEngine.UI;
public class ResponsiveCanvasHelper : MonoBehaviour
{
public static bool _DEBUG = false;
// Apply this to a Camera, and make a material with the shader.
public class CameraRenderWithMaterial : MonoBehaviour
{
public Material material;
void OnRenderImage(RenderTexture source, RenderTexture destination)
{
Graphics.Blit(source, destination, material);
}
}
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName = "Subtitle Default", menuName = "Subtitle SO", order = 1)]
public class SubtitleSO : ScriptableObject
{
#if UNITY_EDITOR
public AudioClip clip;
#endif
[FMODUnity.EventRef] public string fmodEvent;
@joonjoonjoon
joonjoonjoon / PlayAssetPackConfig.json
Last active May 10, 2022 13:58
Some scirpts that were helpful in building for Android
{"assetPacks":[],"targetedAssetPacks":[],"assetBundles":[{"name":"scene1","assetBundles":[{"path":"/Users/gib/git/inua/_Mirror/inua_android/AssetBundles/scene1","textureCompressionFormat":"Default"}],"deliveryMode":"InstallTime"},{"name":"scene2","assetBundles":[{"path":"/Users/gib/git/inua/_Mirror/inua_android/AssetBundles/scene2","textureCompressionFormat":"Default"}],"deliveryMode":"InstallTime"},{"name":"scene3","assetBundles":[{"path":"/Users/gib/git/inua/_Mirror/inua_android/AssetBundles/scene3","textureCompressionFormat":"Default"}],"deliveryMode":"InstallTime"},{"name":"scene4","assetBundles":[{"path":"/Users/gib/git/inua/_Mirror/inua_android/AssetBundles/scene4","textureCompressionFormat":"Default"}],"deliveryMode":"InstallTime"},{"name":"scene5","assetBundles":[{"path":"/Users/gib/git/inua/_Mirror/inua_android/AssetBundles/scene5","textureCompressionFormat":"Default"}],"deliveryMode":"InstallTime"},{"name":"scene6","assetBundles":[{"path":"/Users/gib/git/inua/_Mirror/inua_android/AssetBundles/scene6