Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
‏‏‎

mika unitycoder

‏‏‎
View GitHub Profile
@unitycoder
unitycoder / DSShaderGUI.cs
Created November 3, 2025 11:03
DSShaderGUI from DigitalSalmon
// https://www.twitch.tv/digitalsalmon
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using DigitalSalmon.Extensions;
using UnityEditor;
using UnityEditor.Graphs;
using UnityEditor.Rendering;
using System;
using UnityEngine;
using UnityEngine.Rendering;
using Random = System.Random;
namespace StellarConquest.Presentation.Unity
{
public class StarfieldMeshBuilder : MonoBehaviour
{
public float SphereRadius = 4000;
@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()
{