Skip to content

Instantly share code, notes, and snippets.

View BrianOstrander's full-sized avatar

Brian Ostrander BrianOstrander

View GitHub Profile
@liquidev
liquidev / class.md
Last active February 8, 2025 21:44
My attempt at explaining how to implement classes in Lua

NOTE (2025-02-08)

I've since moved the tutorial over to my website. Clarified some of the wording, added exercises at the end, added links to useful resources.

For historical reasons, I'm keeping the original text here. But if you've just stumbled upon this tutorial for the first time, you may want to check out the revised version!

https://riki.house/programming/lua/classes


@FlaShG
FlaShG / CanvasPositioningExtensions.cs
Last active July 12, 2024 20:51
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>
@lazlo-bonin
lazlo-bonin / UndoUtility.cs
Last active June 17, 2024 12:51
Fixing Unity's broken Undo.RecordObject
using UnityEditor;
using UnityEngine;
using UnityObject = UnityEngine.Object;
namespace Ludiq
{
public static class UndoUtility
{
private static void RecordObject(UnityObject uo, string name)
{
@Geri-Borbas
Geri-Borbas / SaveEditorDefaultResources.cs
Last active March 23, 2020 09:46
Snippet to export Unity Editor Assets for inspection. Read more at http://eppz.eu/blog/unity-editor-icon-assets/
//
// Copyright (c) 2017 eppz! mobile, Gergely Borbás (SP)
//
// http://www.twitter.com/_eppz
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
@staltz
staltz / introrx.md
Last active May 12, 2025 23:22
The introduction to Reactive Programming you've been missing