Skip to content

Instantly share code, notes, and snippets.

View paraself's full-sized avatar
🙆‍♂️
Coding

Yves Wang paraself

🙆‍♂️
Coding
View GitHub Profile
@paraself
paraself / invert.md
Created June 20, 2024 18:23 — forked from arbourd/invert.md
Invert Windows 10 mouse scroll wheel
  1. Open Powershell as an administrator
  2. Run
    Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 1 }
  3. Verify that all mice devices have had their FlipFlopWheel attributes set to 1
    Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0
  4. Reboot
@paraself
paraself / Events.cs
Created August 29, 2016 07:17 — forked from wmiller/Events.cs
Unity3D Event System
using System.Collections;
using System.Collections.Generic;
public class GameEvent
{
}
public class Events
{
static Events instanceInternal = null;
@paraself
paraself / gist:c3fe55f333397319444dfd9cc48491a8
Last active August 4, 2016 10:24 — forked from Arakade/gist:9dd844c2f9c10e97e3d0
Call from OnDrawGizmos() to draw text at Unity3D glocal position in Editor
public static void DrawString(Camera cam,string text, Vector3 worldPos, Color? colour = null)
{
if (IsValidCamera (cam) == false)
return;
UnityEditor.Handles.BeginGUI();
Color c = GUI.color;
if (colour.HasValue) GUI.color = colour.Value;
var view = UnityEditor.SceneView.currentDrawingSceneView;
if (view==null) return;
@paraself
paraself / Easing.cs
Created August 1, 2016 15:58 — forked from Fonserbc/Easing.cs
Compact and simple easing functions for Unity
using UnityEngine;
/*
* Functions taken from Tween.js - Licensed under the MIT license
* at https://github.com/sole/tween.js
*/
public class Easing
{
public static float Linear (float k) {
@paraself
paraself / gist:36b1730737656b5d3222
Created October 3, 2015 18:56 — forked from allanolivei/gist:8982445
Unity 3d : Expose the rendering order of MeshRenderer in the Unity3D
using UnityEngine;
using UnityEditor;
using System.Reflection;
using System;
using UnityEditorInternal;
[CustomEditor(typeof(MeshRenderer)), CanEditMultipleObjects]
public class MeshRendererInspector : Editor
{