Skip to content

Instantly share code, notes, and snippets.

@cablej
cablej / default.md
Created June 21, 2025 18:46
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.
@JoseMiguelPizarro
JoseMiguelPizarro / PreviewData.cs
Created April 6, 2021 15:17
Rendering preview window in Unity
using UnityEngine;
[CreateAssetMenu(menuName ="Data/PreviewData")]
public class PreviewData : ScriptableObject
{
public Color previewColor;
}
/*
A simple little editor extension to copy and paste all components
Help from http://answers.unity3d.com/questions/541045/copy-all-components-from-one-character-to-another.html
license: WTFPL (http://www.wtfpl.net/)
author: aeroson
advise: ChessMax
editor: frekons
*/
#if UNITY_EDITOR
@bzgeb
bzgeb / !UnityUUIDs
Last active March 16, 2021 09:31
Uuids for Unity GameObjects
How I added UUIDs to Unity Game Objects
Shader "Hidden/JumpFloodOutline"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "PreviewType" = "Plane" }
Cull Off ZWrite Off ZTest Always
@Awkwardnaut
Awkwardnaut / gist:8a8dafd6e8b01ee222c765deed6c1f14
Created June 20, 2020 13:33
C# Unity set the center of mass of your rigidbodies
using UnityEngine;
[RequireComponent(typeof(Rigidbody))]
public class CenterOfMass : MonoBehaviour
{
public Vector3 _localCenterOfMass;
private void Awake()
{
SetCenterOfMass();
@blevok
blevok / GyroCamera.cs
Last active October 2, 2021 06:27 — forked from kormyen/GyroCamera.cs
Gyro camera rotation for Android, tested in Unity 2019.3.2 for API level 28, in landscape left orientation.
// Gyro camera rotation for Android, tested in Unity 2019.3.2 for API level 28, in landscape left orientation.
// Extended to include X and Z axis when claibrating, so you can re-center when looking in any direction, and at a variable speed.
// Attach this script to the parent GameObject of your camera. To re-center, from your main script, call CalibrateAngle, set a bool "letsGoToCenter" to true, a bool "goToCenterSlowly" to true or false, and a string "centerRotSpeed" to slow or fast.
// centerRotSpeed is ignored when goToCenterSlowly is false. You can use "Unity Remote 5" in the Play store to test Android gyro in Unity editor.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GyroCamera : MonoBehaviour
@phi-lira
phi-lira / UnlitTexture.shader
Last active November 28, 2025 12:00
URP Unlit Texture example
Shader "Custom/UnlitTexture"
{
Properties
{
[MainColor] _BaseColor("BaseColor", Color) = (1,1,1,1)
[MainTexture] _BaseMap("BaseMap", 2D) = "white" {}
}
// Universal Render Pipeline subshader. If URP is installed this will be used.
SubShader
@daniel-ilett
daniel-ilett / GradientWindow.cs
Created April 8, 2020 00:41
A Unity editor script which lets you save a Gradient as a texture file (place the script inside a folder named Editor).
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.IO;
public class GradientWindow : EditorWindow
{
private Gradient gradient = new Gradient();
private int resolution = 256;
@yasirkula
yasirkula / MultiScreenshotCapture.cs
Last active February 23, 2026 12:18
Capture multiple screenshots with different resolutions simultaneously in Unity 3D
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using UnityEditor;
using UnityEngine;
namespace MultiScreenshotCaptureNamespace
{
internal static class ReflectionExtensions