Skip to content

Instantly share code, notes, and snippets.

@koster
koster / LocSystem.cs
Last active May 21, 2025 21:21
A compact loc system that needs no setup
// Just create a bunch LocString's anywhere
// change Loc.language and you're done
using System.Collections.Generic;
using System;
using System.Collections.Generic;
@HungryProton
HungryProton / box.gd
Last active April 20, 2022 05:29
Spatial gizmo example - A box you can resize
tool
class_name ConceptBoxInput
extends Spatial
signal input_changed
signal property_changed
export var size := Vector3.ONE setget set_size
@HungryProton
HungryProton / smoke_shader.shader
Last active August 4, 2022 17:19
Godot smoke shader test
shader_type spatial;
uniform sampler2D mask;
uniform float min_scale = 0.0;
uniform float max_scale = 1.0;
varying float scale;
float range_lerp(float value, float istart, float istop, float ostart, float oend) {

ScriptableObject Creator for Unity

A handy little ScriptableObject creator which eliminates the need for those annoying [CreateAssetMenu] attributes which are a nightmare to maintain and navigate.

Made with Odin Inspector

ScriptablObject Creator

The ScriptableObject creator has been originally made by Bjarke. Published on Odin Community Made Tools.

Improvements by VladV:

func extrude(bevel: Array, path: Path):
# Bevel is your cross section, it's an array of Vector3
# Path is the curve we're following
var resolution = 1.0
var curve: Curve3D = path.curve
var length: float = curve.get_baked_length()
var steps: int = floor(length / resolution)
var offset: float = length / steps
@yasirkula
yasirkula / MultiScreenshotCapture.cs
Last active February 23, 2026 12:18
Capture multiple screenshots with different resolutions simultaneously in Unity 3D
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using UnityEditor;
using UnityEngine;
namespace MultiScreenshotCaptureNamespace
{
internal static class ReflectionExtensions
@HungryProton
HungryProton / shader_cache.gd
Last active February 18, 2025 15:25
Godot shader cache hack
extends Spatial
var _materials := []
var _process_materials := []
var _count := 0
func _ready() -> void:
_find_all_materials("res://")
print(_process_materials)
@ditzel
ditzel / MeshDestroy.cs
Created August 19, 2019 19:02
MeshDestroy => Put it on a game object with a mesh filter and renderer. Make sure to have read/write enabled on fbx import
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MeshDestroy : MonoBehaviour
{
private bool edgeSet = false;
private Vector3 edgeVertex = Vector3.zero;
private Vector2 edgeUV = Vector2.zero;
using System;
using UnityEngine;
namespace Client.Common {
sealed class PrefabPool<T> : IDisposable where T : Component {
T[] _items = new T[8];
int _itemsCount;
T _prefab;
@mattatz
mattatz / GradientTexGen
Created November 28, 2016 04:14
Gradient Texture2D Generator for Unity.
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
using System.IO;
using System.Collections;
namespace mattatz.Utils {