run as admin> dism /online /Enable-Feature /FeatureName:TelnetClient
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
// https://ameye.dev/notes/edge-detection-outlines/ | |
Shader "Custom/Edge Detection" | |
{ | |
Properties | |
{ | |
_OutlineThickness ("Outline Thickness", Float) = 1 | |
_OutlineColor ("Outline Color", Color) = (0, 0, 0, 1) | |
} | |
SubShader |
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
# Prints out recycle bin sizes per user from C drive | |
# Ensure the script runs as Administrator | |
$recycleBinPath = "C:\`$Recycle.Bin" # Escape the `$` character | |
# Check for each user's Recycle Bin folder | |
Get-ChildItem -LiteralPath $recycleBinPath -Directory -Force | ForEach-Object { | |
$userSID = $_.Name | |
try { | |
# Resolve the SID to a username |
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
// https://discussions.unity.com/t/what-is-the-best-way-to-make-a-map-terrain-for-my-2d-game/1569621/5 | |
using System.Collections.Generic; | |
using UnityEngine; | |
[ExecuteInEditMode] | |
[RequireComponent( typeof(MeshFilter) , typeof(MeshRenderer) )] | |
public class TriangularGridMesh : MonoBehaviour | |
{ | |
[Header("Grid Settings")] | |
[SerializeField] float _gridTriangleLength = 1f; |
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
// attach to main camera, BIRP | |
using UnityEngine; | |
[ExecuteInEditMode] | |
public class MotionFX : MonoBehaviour | |
{ | |
public Material mat; | |
Camera cam; |
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
"""gr.Chatbot() component.""" | |
from __future__ import annotations | |
import inspect | |
import warnings | |
from collections.abc import Callable, Sequence | |
from dataclasses import dataclass, field | |
from pathlib import Path | |
from typing import ( |
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; | |
public class TrackTargets : MonoBehaviour { | |
[SerializeField] | |
Transform[] targets; | |
[SerializeField] | |
float boundingBoxPadding = 2f; |
One of the biggest pains in Unity when developing for WebGL is that if you want to profile it, you have to use the "Build and Run" menu option to do it, while it works, it can be very inconvenient and waste a lot of time recompiling everything, in this brief tutorial I present a way of attaching the profiler without having to recompile everything.
Click here to see the TL;DR (Too long; Didn't Read™) step-by-step if you are not patient enough to read everything
Note: This entire procedure was only tested with Unity 2021.3.29f1. The procedure might be the same in newer versions, but in case it's not, refer below for how I discovered it for this version.
As of 2023-09-28, the Unity documentation states:
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.Runtime.InteropServices; | |
class Program | |
{ | |
[DllImport("winmm.dll", SetLastError = true)] | |
private static extern uint waveInGetNumDevs(); | |
[DllImport("winmm.dll", SetLastError = true, CharSet = CharSet.Auto)] | |
private static extern uint waveInGetDevCaps(uint deviceId, ref WAVEINCAPS waveInCaps, uint size); |
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
// https://docs.unity3d.com/2018.3/Documentation/ScriptReference/UI.Image-alphaHitTestMinimumThreshold.html | |
// attach this script to UI Image gameobject | |
// note the image/script needs to have [x] read write enabled in import settings | |
using UnityEngine; | |
using UnityEngine.EventSystems; | |
using UnityEngine.UI; | |
public class DontHitAlpha : MonoBehaviour, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler | |
{ |
NewerOlder