Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
‏‏‎

mika unitycoder

‏‏‎
View GitHub Profile
@unitycoder
unitycoder / VideoSupportPlugin.java
Created February 21, 2025 09:43 — forked from asus4/VideoSupportPlugin.java
Check supported resolution from unity
package asus4.videosupportedplugin;
import android.media.MediaCodecInfo;
import android.media.MediaCodecList;
/**
* Created by ibu on 2017/03/12.
*/
public final class VideoSupportedPlugin {
@unitycoder
unitycoder / Unity Firebase Push Notifications.md
Last active February 15, 2025 21:35
Unity Firebase Push Notifications

GUIDE

ERRORS

Assembly 'Assets/ExternalDependencyManager/Editor/1.2.185/Google.IOSResolver.dll' will not be loaded due to errors..

Install IOS module to your Unity editor.

Error (active) CS0234 The type or namespace name 'Messaging' does not exist in the namespace 'Firebase' (are you missing an assembly reference?) Assembly-CSharp Assets\Scripts\PushNotifications.cs 23

@unitycoder
unitycoder / validator.bat
Last active February 13, 2025 15:52
Unity Asset Store Validator for Missing Namespaces or *unity* in namespace name
// https://gist.github.com/unitycoder/6b796a2b1392b299854b24cdcd56d305
// run this in your Assets/ folder
@echo off
echo Scanning for C# files without a namespace or with a namespace containing "unity"...
echo.
for /r %%f in (*.cs) do (
rem Check if the file contains any "namespace" keyword
findstr /i "namespace" "%%f" >nul
@unitycoder
unitycoder / TMP_InputField.cs
Created February 13, 2025 07:39 — forked from nikescar1/TMP_InputField.cs
Since TMP_InputField is essentially unusable with gamepad and keyboard navigation, I upgraded them to work better (don't start editing on select and added OnFocus event)
//#define TMP_DEBUG_MODE
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Text;
using System.Text.RegularExpressions;
using UnityEngine;
using UnityEngine.UI;
@unitycoder
unitycoder / TransformEditor.cs
Created February 12, 2025 12:54 — forked from GhatSmith/TransformEditor.cs
Custom inspector for Transform component. Add buttons to reset, copy, paste Transform values. Add context menu to round or truncate values.
using UnityEngine;
using UnityEditor;
namespace OddTales.Framework.Core.EditorExtension
{
/// <summary>
/// Custom inspector for Transform component. Using only DrawDefaultInspector would give different display.
/// Script based on Unity wiki implementation : https://wiki.unity3d.com/index.php/TransformInspector
/// Buttons to reset, copy, paste Transform values.
@unitycoder
unitycoder / OutlineTest.shader
Last active February 7, 2025 13:33
outline for mesh using uv and object scale
Shader "Custom/OutlineTest5001"
{
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
_LineColor ("Line Color", Color) = (1,1,1,1)
_Thickness ("Line Thickness", Range(0.0,0.05)) = 0.01
// _Scale ("Grid Scale", Float) = 1.0
}
@unitycoder
unitycoder / 3d modeling tools, software, download.md
Created February 6, 2025 21:22
3d modeling tools, software, download
@unitycoder
unitycoder / EditorCoroutineRunner.cs
Created February 1, 2025 21:19
Custom importer for Markdown (*.md) files in Unity editor (by DeepSeek)
using System.Collections;
using UnityEditor;
public static class EditorCoroutineRunner
{
private static IEnumerator currentCoroutine;
public static void StartCoroutine(IEnumerator coroutine)
{
if (currentCoroutine != null)
@unitycoder
unitycoder / Remove Logitec Download Assistant.md
Created January 31, 2025 17:57
Remove Logitec Download Assistant (windows)

This gets installed, if you plugin logitec device (like wireless mouse usb plug)

Delete this with REGEDIT Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run Name = Logitech Download Assistant Data = C:\Windows\system32\rundll32.exe C:\Windows\System32\LogiLDA.dll,LogiFetch

// https://www.reddit.com/r/logitech/comments/y4l20q/comment/k120tku/

@unitycoder
unitycoder / MouseController.cs
Created January 22, 2025 20:17
multiplayer draw sample scripts
// from https://www.youtube.com/watch?v=BHl11AvJuDs
using System.Collections;
using System.Collections.Generic;
using Unity.Netcode;
using UnityEngine;
public class MouseController : NetworkBehaviour
{
public LayerMask layerMask;