This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
using UnityEngine.Events; | |
using UnityEngine.UI; | |
namespace Ui | |
{ | |
public class ToggleGroupIndexed : MonoBehaviour | |
{ | |
public event Action<int> SelectedChanged; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://EditorConfig.org | |
# This file is the top-most EditorConfig file | |
root = true | |
# All Files | |
[*] | |
charset = utf-8 | |
end_of_line = crlf | |
indent_style = space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// Note ensure editor resolution matches Canvas fixed resolution (1024 x 768) | |
// | |
/// <summary> | |
/// The intention is to allow the viewport to be move around the screen as controlled by a RectTransform, which it does. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
set noerrorbells | |
set tabstop=4 | |
set shiftwidth=4 | |
set smartindent | |
set nu | |
set nowrap | |
set smartcase | |
set noswapfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static float ConvertRange(float oldValue, float oldMin, float oldMax, float newMin = 0, float newMax = 1) | |
{ | |
float oldRange = (oldMax - oldMin); | |
if (oldRange == 0) | |
return newMin; | |
else | |
return (((oldValue - oldMin) * (newMax - newMin)) / oldRange) + newMin; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run directly from bash without download: | |
# curl -s https://gist.githubusercontent.com/danieldownes/c31b2107879555ebcb436a4e10d2826a/raw/ca495f5f28af778c72712472d279e27698c5606f/commitFilesByModificationDate.sh | bash | |
# Get list of all files in all folders and subfolders | |
# ignore file and '.git' folder | |
# Sort by modification date, desc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Assets/Editor/SearchForComponents.cs | |
using UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class SearchForComponents : EditorWindow | |
{ | |
[MenuItem("Tools/Search For Components")] | |
static void Init () |
OlderNewer