Skip to content

Instantly share code, notes, and snippets.

@danieldownes
danieldownes / RandomPointOnMesh.cs
Last active April 9, 2024 12:14 — forked from v21/gist:5378391
Random point on a mesh, for Unity3D
using UnityEngine;
using System.Collections.Generic;
/// <summary>
/// Get total area of each triangle.
/// Find a random point within that total area.
/// Lookup which triangle that point relates to
/// Find a randiom point which point that triangle
/// This works for all mesh types, and gives fully distributed results.
/// Gist: https://gist.github.com/danieldownes/b1c9bab09cce013cc30a4198bfeda0aa
@danieldownes
danieldownes / github-ci-unity-hololens2-windows-uwp.yml
Created March 30, 2022 10:19 — forked from cookieofcode/github-ci-unity-hololens2-windows-uwp.yml
Github Actions CI Unity HoloLens 2 Build (Windows, UWP)
# GitHub Actions CI for Unity Hololens 2 UWP running on windows.
name: CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityToolbarExtender;
/// <summary>