Skip to content

Instantly share code, notes, and snippets.

View stevemcilwain's full-sized avatar

Steve Mcilwain stevemcilwain

View GitHub Profile
@stevemcilwain
stevemcilwain / static-inspector.md
Created December 19, 2024 16:48
Unity - Static Inspector

using UnityEngine; using UnityEditor; using System; using System.Reflection;

[CustomEditor(typeof(MonoBehaviour), true)] public class StaticVariablesEditor : Editor { public override void OnInspectorGUI() {

@stevemcilwain
stevemcilwain / notes.md
Last active January 19, 2025 14:58
Art
@stevemcilwain
stevemcilwain / spine.md
Last active September 22, 2024 15:45
Spine

Spine 2D Notes

293

@stevemcilwain
stevemcilwain / wsl.md
Last active April 13, 2024 05:09
Security - WSL

Security - WSL

Installing, Updating WSL

wsl --install --distribution kali-linux
wsl --update
wsl --shutdown
@stevemcilwain
stevemcilwain / prompts.md
Last active June 19, 2023 10:58
ChatGPT - Prompts
I want you to become my Expert Prompt Creator. Your goal is to help me craft the best possible prompt for my needs. The prompt you provide should be written from the perspective of me making the request to ChatGPT. The prompt will include instructions to write the output using my communication style. The process is as follows:

1. You will generate the following sections:

"
**Prompt:**
>{provide the best possible prompt according to my request}
@stevemcilwain
stevemcilwain / ObjectSizeDisplay.cs
Last active June 19, 2023 10:11
Unity - Editor - Object Sizes
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(Transform))]
public class ObjectSizeDisplay : Editor
{
private GUIStyle labelStyle;
private void OnSceneGUI()
{
@stevemcilwain
stevemcilwain / SizeGizmo.cs
Created June 19, 2023 10:08
Unity - Gizmos
using UnityEngine;
public class SizeGizmo : MonoBehaviour
{
public Color gizmoColor = Color.yellow;
private void OnDrawGizmos()
{
Vector3 sizeInFeet = transform.localScale * GetWorldScaleFactor();
string sizeText = $"{sizeInFeet.x:F2} ft {sizeInFeet.y:F2} in";
@stevemcilwain
stevemcilwain / notes.md
Last active June 6, 2023 13:17
Unity - String Interpolation

C# String Interpolation

Dates

var date = DateTime.Now;

Debug.WriteLine($"Today is {date}"); // Today is 1/1/2018 12:00:00 AM.
@stevemcilwain
stevemcilwain / bool.md
Last active June 9, 2023 19:29
Unity - C# Extension Methods

Bool Extension Methods

public static class BoolExtensions
{

    public static bool _IsTrue(this bool value)
    {
 return value;