Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
‏‏‎

mika unitycoder

‏‏‎
View GitHub Profile
@unitycoder
unitycoder / TexturedMeshSteps.md
Created May 21, 2025 20:13 — forked from shubhamwagh/TexturedMeshSteps.md
Steps to create textured mesh from point cloud using Meshlab

Steps to create Textured Mesh from Point Cloud using Meshlab

Get your PointCloud into MeshLab

  • Import the pointcloud file in ".ply" file format in Meshlab. Before importing make sure you do some pre-processing / cleaning on point cloud so as to ease the process of meshing.

Point Cloud Simplification and Normals Computation

  • Next we need to reduce the number of point samples for smooth meshing.
    • So go to Filters -> Point Set -> Point Cloud Simplification. Enter Number of samples circa 5% of original number of points. Make sure Best Sample Heuristic is checked.
  • After point cloud simplification, make sure to select Simplified point cloud in the Show Layer Dialog on the right hand side. If not visible, it can be opened by navigating to View -> Show Layer Dialog. Now we need to compute normals for point set.
  • So go to Filters -> Point Set -> Compute normals for point sets . Enter Neighbour num between 10 - 100. Initially try with 10 and
@unitycoder
unitycoder / DynamicMesh.lua
Created May 21, 2025 19:33 — forked from grilme99/DynamicMesh.lua
Example of Roblox's new DynamicMesh class, generated using ChatGPT. Works at runtime in an ordinary LocalScript.
-- Create a new DynamicMesh instance
local dynamicMesh = Instance.new("DynamicMesh")
-- Function to get perlin noise
local function perlinNoise(x, y, scale, height)
return math.noise(x * scale, y * scale) * height
end
local size = 50 -- Size of the terrain
local scale = 0.1 -- Scale factor for Perlin noise
@unitycoder
unitycoder / StarField.cs
Created May 11, 2025 11:36 — forked from silverua/StarField.cs
Script for StarField background in Unity from this tutorial: https://www.youtube.com/watch?v=yu23OAd_Wrw&list=LL
using UnityEngine;
using Random = UnityEngine.Random;
public class StarField : MonoBehaviour
{
private Transform thisTransform;
private ParticleSystem.Particle[] points;
public int starsMax = 100;
public float starSize = 1f;
@unitycoder
unitycoder / pause-win11-upgrade.txt
Created May 6, 2025 08:05
How to pause Windows 10 to Windows 11 forced upgrade
#ProTip™: You can pause win10 to 11 update for much longer,
if you click: Pause updates, then un-pause it (before that last pause date), then pause again instantly.
Now you can click 'pause for 7 days' many times.. got myself almost 1 month extra.
@unitycoder
unitycoder / Trello Checklist Exporter.js
Last active April 30, 2025 07:39
GreaseMonkey Trello Checklist Exporter
// ==UserScript==
// @name Trello Checklist Exporter
// @namespace https://unitycoder.com/
// @version 1.3
// @description Export Trello card checklists (visible items only) to plain text, download as .txt file. See button in Actions list.
// @author unitycoder_com
// @match https://trello.com/c/*
// @grant none
// ==/UserScript==
// From: https://answers.unity.com/questions/801928/46-ui-making-a-button-transparent.html?childToView=851816
//
// @kurtdekker
//
// Touchable invisible non-drawing Graphic (usable with Buttons too):
//
// To make an invisible Button:
//
// 1. make a Button in the normal way
// 2. delete the "Text" GameObject which comes below a Button as standard
@unitycoder
unitycoder / CppBuildPreprocessing.cs
Created April 17, 2025 12:56 — forked from yCatDev/CppBuildPreprocessing.cs
Script that enables Full Generic Sharing by default for all builds for Unity 2021
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
public class CppBuildPreprocessing : IPreprocessBuildWithReport
{
public int callbackOrder
{
get { return 0; }
@unitycoder
unitycoder / InspectorLock.cs
Created April 13, 2025 18:15 — forked from adammyhre/InspectorLock.cs
Lock Inspector Icon and Transform Constrain Proportion Icon in Unity
using System.Reflection;
using UnityEditor;
using UnityEngine;
/// <summary>
/// Toggles the Inspector lock state and the Constrain Proportions lock state.
/// </summary>
public static class LockInspector {
static readonly MethodInfo flipLocked;
static readonly PropertyInfo constrainProportions;
@unitycoder
unitycoder / HeatmapCompute.compute
Created April 13, 2025 18:14 — forked from adammyhre/HeatmapCompute.compute
Compute Shader + Render Feature Heatmap
#pragma kernel CSMain
RWTexture2D<float> heatmapTexture;
float2 texSize;
StructuredBuffer<float2> enemyPositions;
int enemyCount;
[numthreads(8, 8, 1)]
void CSMain(uint3 id : SV_DispatchThreadID)

How to use GitHub releases as markdown image storage

I often uploaded images to GitHub issues and used their URLs in markdown files (such as README.md).
This method was convenient since it didn’t require adding the images to the repository, and each image had a unique URL.
However, in (probably) March 2025, GitHub changed their policy so that accessing images uploaded to issues now requires cookie-based authentication.
This applies even to images uploaded to issues in public repositories.

As a result, the benefit of 'anyone who knows the URL can access the image' has been lost.