Skip to content

Instantly share code, notes, and snippets.

View RedDude's full-sized avatar

Rinaldo Alipio Bueno RedDude

View GitHub Profile
@mob-sakai
mob-sakai / 00_Unity Internal Feature Samples.md
Last active September 13, 2025 16:39
Unity Internal Feature Samples
@LukasFratzl
LukasFratzl / MeshApplyJob.cs
Last active November 14, 2022 17:20
Apply a Unity Mesh with the Jobs System 2022
/*
LICENCE -> MIT License
AUTHOR -> Lukas Fratzl
GIT -> https://github.com/LukasFratzl
DESCRIPTION -> My implementation of "Marching Cubes" in Unity with Burst and Multithreaded with c# Jobs
the algorithm is smart enough to generate every "Grid Size" with every wanted "Resolution"
as extra with a "Smooth" or "Flat" normal generation
USAGE -> Assign all field and allocate the Native Containers, Schedule the Job and Complete it
When you don't know how the mesh is created just watch this Gist -> https://gist.github.com/LukasFratzl/988f1c9736b43684deb319880ac6c6fc
@LukasFratzl
LukasFratzl / MarchingCubesJob.cs
Last active June 2, 2025 13:06
Marching Cubes in Unity with Burst and C# Jobs
/*
LICENCE -> MIT License
AUTHOR -> Lukas Fratzl
GIT -> https://github.com/LukasFratzl
DESCRIPTION -> My implementation of "Marching Cubes" in Unity with Burst and Multithreaded with c# Jobs
the algorithm is smart enough to generate every "Grid Size" with every wanted "Resolution"
as extra with a "Smooth" or "Flat" normal generation
USAGE -> Assign all field and allocate the Native Containers, Schedule the Job and Complete it
-> SEE EXAMPLE JOB DOWN BELOW!
GENERATE SPEED -> RESOLUTION 32 -> 26.9 ms | 27 024 Vertices | 1 CHUNK
@beardordie
beardordie / CustomGameObjectInspector.cs
Last active March 6, 2025 01:24
Custom Game Object Inspector - filter the Inspector to find a property or component, made by Mattimus in the More Mountains Community Discord (updated to work with Unity 2022.3)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System;
using System.Reflection;
[CustomEditor(typeof(GameObject), true)]
[CanEditMultipleObjects]
public class CustomGameObjectInspector : Editor
@FNGgames
FNGgames / IApplicationService.cs
Last active October 12, 2023 01:30
Entitias Scene Initialization Example
public interface IApplicationService : IService
{
HashSet<string> GetValidScenes();
void Load(string sceneName, Action<string, float> onProgress, Action<string> onComplete);
void Unload(string sceneName, Action<string, float> onProgress, Action<string> onComplete);
void Quit();
}
@gkhays
gkhays / Download File with Node.md
Created February 27, 2020 17:26
Download a file from a URL using Node.js

Download File from URL

Proof-of-concept to download a file from a URL and save it locally. For example, I may wish to retrieve a JAR file from Nexus.

Uses the http package, which does the basics with raw HTTP protocol support.

Possible update: use request, it is like the Python's requests library. There is a companion package called node-request-progress that tracks download progress. See request-progress on GitHub.

Note: The request package has been deprecated.

/// For this to work you need to copy these 2 files:
/// "YOUR UNITY LOCATION"\Editor\Data\Mono\lib\mono\X.X\System.Drawing.dll
/// "YOUR UNITY LOCATION"\Editor\Data\Mono\lib\mono\X.X\System.Windows.Forms.dll
/// ..to a "Plugins" folder within your project
///
/// For this example to work, you need to have a (UI) Canvas object in your scene
/// Put this script on any object
///
/// Tested on windows, not sure if it works on any other platform
///
@zombience
zombience / ComponentGrabber.cs
Last active January 25, 2025 18:18
Unity3D: Search for any Components on a given game object, present as selectable object fields
using UnityEngine;
using System.Collections.Generic;
public class ComponentGrabber : MonoBehaviour
{
[SerializeField, HideInInspector]
string searchTerm, filter;
[HideInInspector]
public List<Component> curSelection = new List<Component>();
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
// This is only useful for spritesheets that need to be automatically sliced (Sprite Editor > Slice > Automatic)
public class AutoSpriteSlicer
{
[MenuItem("Tools/Slice Spritesheets %&s")]
@FlaShG
FlaShG / CanvasPositioningExtensions.cs
Last active November 28, 2025 20:57
A small Unity helper class to convert viewport, screen or world positions to canvas space.
using UnityEngine;
/// <summary>
/// Small helper class to convert viewport, screen or world positions to canvas space.
/// Only works with screen space canvases.
/// </summary>
/// <example>
/// <code>
/// objectOnCanvasRectTransform.anchoredPosition = specificCanvas.WorldToCanvasPoint(worldspaceTransform.position);
/// </code>