Skip to content

Instantly share code, notes, and snippets.

View aDu's full-sized avatar
Coding 24/7

TheAlanski aDu

Coding 24/7
View GitHub Profile
@fguillen
fguillen / RandomPointInCollider.cs
Last active August 1, 2022 07:11
Unity, generate a random point into a Polygon
using System;
using UnityEngine;
public class RandomPointInCollider
{
Collider2D collider;
Vector3 minBound;
Vector3 maxBound;
int maxAttempts;
@pbhogan
pbhogan / AspectRatioPanel.cs
Last active September 16, 2025 08:24
Unity UI-Toolkit Aspect Ratio Preserving Panel
/*
This is free and unencumbered software released into the public
domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors