Skip to content

Instantly share code, notes, and snippets.

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

mika unitycoder

✅
‏‏‎
View GitHub Profile
@unitycoder
unitycoder / cpp-notes-vs.txt
Last active March 19, 2026 20:13
Visual Studio c++ notes cpp cplusplus
-------------------
-------------------
-------------------
-------------------
-------------------
-------------------
-------------------
-------------------
Error: \Microsoft.CppBuild.targets(463,5): error MSB8020: The build tools for v145 (Platform Toolset = 'v145') cannot be found. To build using the v145 build tools, please install v145
@unitycoder
unitycoder / flash-as3.txt
Created October 22, 2019 07:31
Flash AS3 Animator Notes
// ERROR
ReferenceError: Error #1069: Property onMetaData not found on flash.net.NetStream and there is no default value.
ReferenceError: Error #1069: Property onXMPData not found on flash.net.NetStream and there is no default value.
ReferenceError: Error #1069: Property onPlayStatus not found on flash.net.NetStream and there is no default value.
you have not implemented those methods..
// FIX
ns.client = this;
function onMetaData(info:Object):void {}
function onPlayStatus(info:Object):void{}
@unitycoder
unitycoder / vs-commandline-application.txt
Created October 19, 2019 19:36
Visual Studio Commandline Application Notes
// build single exe without exe.config file
- solution explorer: app config properties, build action: Resource
- note: (doesnt work if you have some config data to be read)
// copy DLL's into custom folder (beside exe)
- use script similar to this https://stackoverflow.com/a/10600034/5452781
- it catches missing dll files, and points into new folder where they are
AppDomain.CurrentDomain.AssemblyResolve += (sender, bArgs) =>
{
string assemblyName = new AssemblyName(bArgs.Name).Name;
@unitycoder
unitycoder / CountPixels.compute
Created October 19, 2019 09:57
Count Pixels in RenderTexture
// https://forum.unity.com/threads/how-can-i-count-the-number-of-pixels-above-a-threshold-with-a-shader.763232/#post-5084408
#pragma kernel CSMain
#pragma kernel CSInit
Texture2D<float4> InputImage;
RWStructuredBuffer<int> ResultBuffer;
[numthreads(1, 1, 1)]
@unitycoder
unitycoder / vive-cosmos-unity.md
Created October 17, 2019 06:07
Unity Vive Cosmos VR issues
@unitycoder
unitycoder / Equirectangular.shader
Last active February 22, 2024 19:06
shader code to do equirectangular lookups on a texture
// https://forum.unity.com/threads/mapping-a-point-in-world-space-to-a-uv-of-a-sphere.760868/
// https://forum.unity.com/threads/what-is-wrong-with-unitys-spherical-mapping-how-to-fix-it.321205/#post-2083408
Shader "Custom/Equirectangular" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Diffuse (RGB) Alpha (A)", 2D) = "gray" {}
}
SubShader{
Pass {
@unitycoder
unitycoder / Stochastic.shader
Created October 15, 2019 06:35
Unity Stochastic Texture Sample
// https://old.reddit.com/r/Unity3D/comments/dhr5g2/i_made_a_stochastic_texture_sampling_shader/
Shader "Custom/StochasticSample"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_BumpMap ("BumpMap", 2D) = "bump" {}
_BumpScale ("BumpScale", Float) = 1
_Smoothness ("Smoothness", 2D) = "white" {}
@unitycoder
unitycoder / git-cheat-sheet.sh
Created October 9, 2019 13:59
git cheat sheet
# https://bitbucket.org/BitPusher16/dotfiles/raw/49a01d929dcaebcca68bbb1859b4ac1aea93b073/refs/git/git_examples.sh
#!/bin/bash
##########
# contents
##########
# contents
# notes
@unitycoder
unitycoder / html-css.html
Last active March 4, 2024 05:48
HTML CSS Notes
// https://github.com/atherosai/ui/tree/main/layout-01
responsive grid layout
// blending mode css
https://hackernoon.com/a-css-property-that-every-web-designer-must-to-know-li6w36ca
// make website mobile friendly
- add viewport meta: (scale = 0 is no zoom)
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- test in chrome, better than firefox mobile preview