Skip to content

Instantly share code, notes, and snippets.

View sathyarajshetigar's full-sized avatar

Sathyaraj Shettigar sathyarajshetigar

  • Ironjaw Studios Pvt. Ltd
View GitHub Profile
@markeahogan
markeahogan / InspectorCapture.cs
Created August 3, 2023 07:02
Adds method to save the whole inspector to a screenshot
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
/// <summary>
/// Provides functionality for screenshotting full editor windows, and the inspector in particular
using UnityEngine;
using System.IO;
using System;
public static class RenderTextureExtensions
{
private static DefaultDictionary<RenderTexture, Texture2D> _cachedTextures = new DefaultDictionary<RenderTexture, Texture2D>();
@spdp-dev
spdp-dev / ScreenShotter.cs
Last active May 8, 2023 17:41
A screenshot taking tool for Unity. Drop this onto a "ScreenShotter" or similarily named empty object in your scene and configure as desired. The defaults are however pretty good with screenshots being dumped to the top of your project folder every three seconds. Don't forget to exclude this directory in your .gitignore!
#if UNITY_EDITOR
using System.IO;
using UnityEngine;
public class ScreenShotter : MonoBehaviour
{
static ScreenShotter instance;
public static ScreenShotter Instance
{
get
@ShabbirHasan1
ShabbirHasan1 / TradeTronAutoLogin.py
Last active February 7, 2023 04:28
TradeTron Auto Login
import os
import sys
import random
from time import sleep
try:
from playwright_recaptcha import recaptchav2
from playwright.sync_api import Playwright, sync_playwright, expect
except (ImportError, ModuleNotFoundError):
os.system(
@Asuta
Asuta / ScriptFileWatcher.cs
Last active January 20, 2023 09:52 — forked from elringus/ScriptFileWatcher.cs
Modify the version to be directly available, monitor all folders containing C# scripts under assets, and directly copy them to any directory under"Assets/Scritps",and You can add as many folders as you want
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
namespace Naninovel
@devindazzle
devindazzle / SpriteWrapper.cs
Created November 29, 2022 10:56
This component will mirror a sprite renderer and create a sprite wrapping effect at the edges of the screen similar to the game Asteroids. To use the component, add it to the same game object as the sprite renderer you want to mirror and it just works. Optionally, you can set the warp property to true and the game object will warp to the opposit…
using UnityEngine;
[RequireComponent(typeof(SpriteRenderer))]
public class SpriteWrapper : MonoBehaviour {
[Header("Sprite Wrapper")]
[Tooltip("Should sprite be wrapped when reaching the edge of the screen?"), SerializeField]
private bool wrap;
@karljj1
karljj1 / DefaultTmpFont.cs
Last active December 31, 2023 17:48
Localize the default TextMeshPro font.
using System.Reflection;
using TMPro;
using UnityEngine;
using UnityEngine.Localization;
/// <summary>
/// Sets the default TextMeshPro font to be used.
/// </summary>
[ExecuteInEditMode]
public class DefaultTmpFont : MonoBehaviour
@hybridherbst
hybridherbst / VisualizeMotionTrajectories.cs
Created September 13, 2022 20:48
Motion Trajectories in Unity 3D
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
using UnityEngine.Playables;
namespace Needle.AnimationUtils
{
public class VisualizeMotionTrajectories : MonoBehaviour
@SaeedPrez
SaeedPrez / AudioVisualizer.cs
Created February 3, 2022 17:42
Simple audio visualizer for Unity
using System.Linq;
using UnityEngine;
[RequireComponent(typeof(AudioSource))]
public class AudioVisualizer : MonoBehaviour
{
[SerializeField] private float barWidth = 0.1f;
[SerializeField] private float updateDelay = 0.04f;
[SerializeField] private Color[] barColors;
[SerializeField] private float barMultiplier = 2f;
@omid3098
omid3098 / ObjectActivationSwitch.cs
Created February 3, 2022 16:25
A tiny little editor window to switch objects activation state
/*
Copyright (c) 2022 Omid Saadat
Licensed under the MIT License (Do whatevever you want with this!);
*/
using UnityEngine;
using UnityEditor;
public class ObjectActivationSwitch : EditorWindow
{
[MenuItem("LeMoonade/ObjectActivationSwitch")]