Skip to content

Instantly share code, notes, and snippets.

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
@joonjoonjoon
joonjoonjoon / ICNSGenerator.cs
Last active February 9, 2024 13:25
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;
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;
@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
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 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 / DebugTestZoom.cs
Created October 21, 2020 00:21
a quick experiment on how to do 2D zooms on a 3D camera
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class DebugTestZoom : MonoBehaviour
{
public Vector2 pers;
public float zoom;
using UnityEngine;
public static class Vector3Extension
{
public static Vector3 withX(this Vector3 parent, float x)
{
return new Vector3(x, parent.y, parent.z);
}
public static Vector3 withXY(this Vector3 parent, float x, float y)
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEditor;
using UnityEngine.Profiling;
class SimpleProfilerWindow : EditorWindow
{
@joonjoonjoon
joonjoonjoon / Footsteps.cs
Last active August 28, 2024 18:49 — 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 */