Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
‏‏‎

mika unitycoder

‏‏‎
View GitHub Profile
@unitycoder
unitycoder / rust cargo notes.md
Created October 3, 2025 17:53
rust cargo notes

update rust

rustup update

@unitycoder
unitycoder / FresnelOverlay_Add1.shader
Created September 30, 2025 13:06
Fresnel shaders, HDR, Overlay
Shader "Custom/FresnelOverlay_Add1"
{
Properties
{
[HDR]_RimColor ("Fresnel Color (HDR)", Color) = (3,3,3,1)
_RimPower ("Fresnel Power", Range(0.1, 8)) = 3.0
_RimStrength ("Fresnel Strength", Range(0, 10)) = 1.0
_DoubleSided ("Double-Sided (0=Back,1=Off,2=Front)", Range(0,2)) = 2
_DepthBias ("Depth Bias (to avoid misses)", Float) = 0.0
}
@unitycoder
unitycoder / OutlineOnlyHDR.shader
Created September 30, 2025 11:45
mesh outline only hdr
// by Mr. Chap Gipity
Shader "Custom/OutlineOnlyHDR"
{
Properties
{
[HDR]_OutlineColor("Outline (HDR Emission)", Color) = (5,5,5,1)
_OutlineWidth("Width (view-space units)", Float) = 0.02
_ZOffset("Depth Offset (units)", Float) = 0.0
}
SubShader
@unitycoder
unitycoder / what does WTF mean - Welcome to Finland.md
Created September 19, 2025 18:41
what does WTF mean? Meaning of WTF, Real meaning W T F? Explain WTF.

what does WTF mean? Meaning of WTF, Real meaning W T F? Explain WTF.

It means: Welcome To Finland W = Welcome T = To F = Finland

This is the original true meaning.

@unitycoder
unitycoder / visual studio 2026 insider edition.md
Created September 10, 2025 18:26
visual studio 2026 insider edition ux issues and bugs

visual studio 2026 insider edition

ux issues

  • start window, scrollbar is 1px width and appears on mouse over (always annoying, if you miss it by 1 pixel it disappears)
  • recent projects list: big mouseover tooltip blocks view (and it shows the same folder path that i can already see below the project name)
  • creating new project: back button is white text, next button is black with purple bg, back button is more visible

bugs

@unitycoder
unitycoder / Tint Final Color.shader
Created September 2, 2025 10:25
BIRP apply FinalColor in shader
// https://docs.unity3d.com/6000.2/Documentation/Manual/SL-SurfaceShaderExamples-FinalColor.html
Shader "Example/Tint Final Color" {
Properties {
_MainTex ("Texture", 2D) = "white" {}
_ColorTint ("Tint", Color) = (1.0, 0.6, 0.6, 1.0)
}
SubShader {
Tags { "RenderType" = "Opaque" }
CGPROGRAM
#pragma surface surf Lambert finalcolor:mycolor
@unitycoder
unitycoder / SimpleController_UsingActionAsset.cs
Created September 2, 2025 10:15
new input system under heavy load sample script
// example script from Unity about this issue https://issuetracker.unity3d.com/issues/the-new-input-system-is-not-detecting-clicks-when-under-heavy-load
using UnityEngine;
// Use action set asset instead of lose InputActions directly on component.
public class SimpleController_UsingActionAsset : MonoBehaviour
{
private SimpleControls m_Controls;
Vector3 m_MovementSum = Vector3.zero;
public float speed = 10f;
@unitycoder
unitycoder / UnityGMail.cs
Created August 28, 2025 10:04 — forked from marcotmp/UnityGMail.cs
Code to send email from unity using a Google account.
using System.ComponentModel;
using System.Net;
using System.Net.Mail;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
public class UnityGMail
{
public void SendMailFromGoogle()
{
@unitycoder
unitycoder / Dictionary, Sanakirja (unohdetut, tuntemattomat sanat).md
Last active August 7, 2025 11:34
Dictionary, Sanakirja (unohdetut, tuntemattomat sanat)

Pulk Jumper

PulkkaHyppy suoritetaan pitämällä pulkkaa selässä käsissä, samalla juosten kohti ojaa tai muuta alamäkeä. Ilmahypyn aikana pulkka vedetään sopivaan kohtaan itsesi alle, jotta voit laskeutua rinteeseen pulkan kyydissä laskuasennossa. Kun olet laskeutunut hypystä, vedä itsesi parempaan asentoon pulkan kyydissä, jotta lasku jatkuu hyvin. Laskeutuessa jalat ovat yleensä ilmassa ja istut pelkkä takapuoli pulkassa, 30-50 asteen kulmassa (nojaten taaksenpäin), ja sitten jalat laskeutuvat pulkan kyytiin.

Vinkkejä

  • On tärkeää laskeutua oikeassa kulmassa ja sopivan jyrkkään rinteeseen (ei tasaiselle), muuten selkä hajoaa pulkan takareunaan
  • Pitämällä kiinni pulkasta käsillä, voit osittain joustaa laskeutumista käsien varaan (ettei tule kova tömähdys)
@unitycoder
unitycoder / Minecraft "No Route To Host" LAN Mac to PC connection issue.md
Last active June 27, 2025 11:30
Minecraft "No Route To Host" LAN Mac to PC connection issue

Minecraft "No Route To Host" LAN Mac to PC connection issue

  • In Mac: Use same DNS as the host or other LAN machines!
  • For example: 192.168.1.1 (check in Mac wifi settings that is your DNS, it might be cloudflare or google dns)
  • Or toggle wifi on and off (in mac)