Skip to content

Instantly share code, notes, and snippets.

View bwaynesu's full-sized avatar
💭
Why dark mode? Cause light attracts bugs🦋

bwaynesu bwaynesu

💭
Why dark mode? Cause light attracts bugs🦋
View GitHub Profile
@bwaynesu
bwaynesu / Unity Collision Behavior Test Results Table.md
Last active October 25, 2025 07:58
Unity Collision Test Results: Event triggers for CharacterController (CC) vs. Rigidbody (RB) with Colliders, Triggers, and Physics.OverlapSphere detection.
Test Case CollEntr CollStay CollExit TrigEntr TrigStay TrigExit CCHit OverlapSphere
CC_vs_Collider - - - ✓ CC
CC_vs_Collider+RB - - - ✓ CC
CC_vs_Trigger - - - ✓ CC
CC_vs_Trigger+RB - - - ✓ CC
RB_vs_Collider - - - - ✓ RB
RB_vs_Collider+RB - - - - ✓ RB
RB_vs_Trigger - - -
@bwaynesu
bwaynesu / WeakReferenceUnity.cs
Last active November 22, 2024 09:27
Wrapper class for WeakReference that can be used with UnityEngine.Object
/*
* Author: bwaynesu
* Date: 2024-11-20
* GitHub: https://github.com/snoopyuj
* Description: Wrapper class for WeakReference that can be used with UnityEngine.Object.
* Goal: To make IsAlive and TryGetTarget work properly with UnityEngine.Object.
*
* Change Log:
* - 1.0.0 (2024-11-20) - Initial version
*/
@bwaynesu
bwaynesu / PlayableDirectorExtendFeaturesEditor.cs
Last active November 15, 2024 10:34
This script is used to extend the features of PlayableDirector in the Unity Editor.
/*
* Author: bwaynesu
* Date: 2024-11-07
* GitHub: https://github.com/snoopyuj
* Description: This script is used to extend the features of PlayableDirector in the Unity Editor.
*
* Change Log:
* - 1.0.0 (2024-11-07) - Initial version: Add the feature to remove unused bindings.
*/
@bwaynesu
bwaynesu / ManyToOneBiMap.cs
Last active July 12, 2024 12:40
This class allows you to associate multiple TMany keys to a single TOne value while also enabling lookup in both directions.
/*
* Author: bwaynesu
* Date: 07/10 2024
* https://github.com/snoopyuj
*/
using System.Collections.Generic;
namespace BUtilties.Collections
{
using System.Collections;
using UnityEngine;
public class TestNull : MonoBehaviour
{
public UnityEngine.Object serializedObj = null;
// The results of privateSerializeObj are the same as publicObj
// [SerializeField]
// private UnityEngine.Object privateSerializeObj = null;
using System;
using UnityEngine;
using UnityEngine.Profiling;
/// <summary>
/// This script is used to observe the garbage collection (GC) situation when an action is passed as a parameter in different scenarios.
/// You can try writing the answer yourself using TryItYourself(). The answer is in HereAreAnswers().
/// Additionally, you can run this Mono and observe the Profiler for more detailed information.
/// </summary>
public class TestActionGC : MonoBehaviour
@bwaynesu
bwaynesu / CoroutineExtensions.cs
Created December 9, 2023 05:45
Make Unity's MonoBehaviour to simultaneously/sequentially execute multiple Coroutines.
/*
* Author: bwaynesu
* Date: 06/19 2023
* https://github.com/snoopyuj
*/
public static class CoroutineExtensions
{
/// <summary>
/// Execute Coroutines sequentially and invoke a callback upon completion.
@bwaynesu
bwaynesu / FullscreenPlayMode.cs
Last active May 17, 2019 06:02
Unity Editor Game View Fullscreen Mode
/*
* Author: bwaynesu
* Support Unity Version: 2017 or LOWER
*/
using UnityEngine;
using System.Reflection;
using System.IO;
using System;
package ce1002.E9.s101522071;
import java.util.Random;
import java.util.TimerTask;
import javax.swing.JLabel;
public class list extends TimerTask
{
static JLabel lab = new JLabel("0 ", JLabel.RIGHT);
@bwaynesu
bwaynesu / E9.java
Last active December 18, 2015 03:58
package ce1002.E9.s101522071;
import java.awt.*;
import java.awt.event.*;
import java.util.Random;
import java.util.Timer;
import javax.swing.*;
import java.util.*;