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
namespace PixelDash.Tools.Editor.Presentation | |
{ | |
using System; | |
using PixelDash.Tools.Presentation; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.Assertions; | |
using UObject = UnityEngine.Object; | |
using Flags = PixelDash.Tools.Presentation.PDCollectionFlags; |
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
{"lastUpload":"2024-06-20T21:08:41.666Z","extensionVersion":"v3.4.3"} |
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
// Goal: Add type safety and compile time checks to sprintf. | |
// | |
// * Use % as a placeholder for any type, without requiring a type parameter such as %f or %s | |
// * Ensure the number of % placeholders matches the number of parameters at compile time | |
// * Use strcpy where possible, instead of building the string character by character | |
// * Don't do multiple passes over the format to count % placeholders ahead of time | |
// * Not currently worried about custom format specifiers like %.2f (will expand later to allow e.g. {0.2}) | |
// Grammer | |
// % is a placeholder for a value |
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
DXGI_FORMAT renderTextureFormat = DXGI_FORMAT_B5G6R5_UNORM; | |
// Device | |
hr = D3D11CreateDevice( | |
nullptr, | |
D3D_DRIVER_TYPE_HARDWARE, | |
nullptr, | |
D3D11_CREATE_DEVICE_SINGLETHREADED | D3D11_CREATE_DEVICE_DEBUG, |
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
$user = [Security.Principal.WindowsIdentity]::GetCurrent(); | |
$isAdmin = (New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) | |
if (-Not $isAdmin) | |
{ | |
Start-Process pwsh -Wait -Verb RunAs -ArgumentList "-Command $PSCommandPath $args; pause" | |
return | |
} | |
$fileName = $args | |
if ($fileName) |