Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
✅
‏‏‎

mika unitycoder

✅
‏‏‎
View GitHub Profile
@unitycoder
unitycoder / 3d-viewers.md
Last active February 17, 2025 07:25
online 3D viewers html webgl free paid
@unitycoder
unitycoder / unity-test-framework-0.md
Last active November 22, 2020 20:34
Unity Test Framework
@unitycoder
unitycoder / vanhat-sanat.txt
Created December 2, 2020 10:12
vanhat sanonnat sanat
"ota veikkosella" = ota vaan ei haittaa
"eihän se niin nopon nuukaa ole" =
@unitycoder
unitycoder / RXLookingGlass.cs
Created December 5, 2020 10:21 — forked from MattRix/RXLookingGlass.cs
This class wraps an internal Unity method that lets you to check if a ray intersects a mesh. Place it in an Editor folder.
using UnityEngine;
using UnityEditor;
using System.Collections;
using System;
using System.Linq;
using System.Reflection;
[InitializeOnLoad]
public class RXLookingGlass
{
/*
* Used for culling tiles in a map renderer I wrote.
* All tiles used geometry in the [-1, 1] range, and their mvp matrix would get precalculated.
* So it was simply a matter of seeing if their projected OBB overlapped with the screen's clip space.
* Returns true if the cube is visible. (false positives for near misses due to conservative w-value)
*/
static inline bool MapTileFrustumCull(const mat4 mvp){
// Clip space center of the cube is the last column of the matrix.
vec4 c = {mvp.m[12], mvp.m[13], mvp.m[14], mvp.m[15]};
// Clip space extents are the component wise absolute values of the first three columns.
@unitycoder
unitycoder / dotnet-core.txt
Last active April 10, 2022 13:30
dotnet core visual studio
---------------------
---------------------
---------------------
---------------------
---------------------
---------------------
---------------------
---------------------
---------------------
---------------------
@unitycoder
unitycoder / whatsapp.md
Last active December 11, 2020 07:57
whatsapp notes

access old number after iphone restore (that you have no longer access to, cannot verify)

  • (remove whats app before restore)
  • remove sim
  • connect to wifi, so that whatsapp downloads
  • disconnect wifi
  • set date to restore date, so that old whats app still runs (otherwise it says "this version has expired"
  • run whatsapp, should start normally

trying to change number (using manual old time & date)

  • error "whatsapp requires active internet connection to change number"
@unitycoder
unitycoder / TeamColor.shader
Created December 28, 2020 17:23
Team Color Variation Shader
// https://bgolus.medium.com/the-team-color-problem-b70ec69d109f
Shader "Custom/Team Color (Premultiplied)" {
Properties {
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_TeamColor ("Team Color", Color) = (1,1,1,1)
[NoScaleOffset] _TeamColorMask ("Team Color Mask", 2D) = "black" {}
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200 CGPROGRAM