Skip to content

Instantly share code, notes, and snippets.

View kwan3854's full-sized avatar

KwanJoong Lee kwan3854

View GitHub Profile
@kwan3854
kwan3854 / SafeLoggerEntryPoint.cs
Last active September 2, 2025 07:23
UnityFileLogger
using System;
using System.Collections.Concurrent;
using System.IO;
using System.Text;
using System.Threading;
using UnityEngine;
using VContainer.Unity;
public class SafeLoggerEntryPoint : IStartable, ILogFetchable, IDisposable
{
@kwan3854
kwan3854 / BuildDateGenerator.cs
Created July 29, 2025 08:03
A tiny editor script that stamps your build with the time it was produced. On every build, it writes a BuildDate.txt file under Assets/Data/Resources/ so you can read it at runtime via Resources.Load.
using System;
using System.IO;
#if UNITY_EDITOR
public class BuildDateGenerator : UnityEditor.Build.IPreprocessBuildWithReport
{
public int callbackOrder => 0;
public void OnPreprocessBuild(UnityEditor.Build.Reporting.BuildReport report)
{
using (StreamWriter writer = new StreamWriter("Assets/Data/Resources/BuildDate.txt", false))
@kwan3854
kwan3854 / SafeAreaContainer.cs
Last active July 25, 2025 08:22
A tiny, reactive safe area wrapper for Unity UGUI. It automatically re-anchors its RectTransform to Screen.safeArea and keeps it updated on devices with notches/punch-holes, foldables, multi-display setups, or when the resolution/screen changes.
using R3;
using R3.Triggers;
using UnityEngine;
[RequireComponent(typeof(RectTransform))]
public class SafeAreaContainer : MonoBehaviour
{
private RectTransform _rectTransform;
private void Awake()
@kwan3854
kwan3854 / default.md
Created July 7, 2025 12:18 — forked from cablej/default.md
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.