Skip to content

Instantly share code, notes, and snippets.

@Saris-S
Saris-S / GlichEffect.shader
Last active October 18, 2025 18:08
Glich_Shader
Shader "Custom/GlitchEffect"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_GlitchStrength ("Glitch Strength", Range(0, 1)) = 0.1
_UseFloorGlitch ("Use Floor Glitch", Float) = 0 // 0 = Обычный, 1 = С `floor()`
}
@Saris-S
Saris-S / CubeGlich.shader
Last active October 18, 2025 18:09
Cube_Glich_Shader
Shader "Unlit/CubeGlich"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_GlitchStrength ("Glitch Strength", Range(0, 1)) = 0.1
_BlockSize ("Block Size", Range(1, 50)) = 10
}
SubShader
{
@Saris-S
Saris-S / JustTheMostUsefulScriptEver_Rememberer.cs
Last active October 18, 2025 18:09
Rememberer (UNITY_EDITOR)
#if UNITY_EDITOR
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
using System.Reflection;
[InitializeOnLoad]
public static class TheMostUsefulScriptEver_Rememberer
{
const string PREF_KEY = "TheMostUsefulScriptEver_Rememberer_Enabled";
@Saris-S
Saris-S / LightProbePlacer.cs
Last active October 18, 2025 18:11
Light Probe Placer (UNITY_EDITOR)
#if UNITY_EDITOR
using UnityEngine;
//using UnityEditor; // Для работы в редакторе
[ExecuteInEditMode] // Позволяет скрипту работать в редакторе
[RequireComponent(typeof(LightProbeGroup))] // Требует наличия LightProbeGroup
public class LightProbePlacer : MonoBehaviour
{
[Header("Corner Points (Diagonal)")]
[Tooltip("Первая точка (один из углов прямоугольника)")]
@Saris-S
Saris-S / EnterPlayModeTogglesToolbar.cs
Created July 18, 2025 18:26
EnterPlayModeTogglesToolbar (UNITY_EDITOR)
#if UNITY_EDITOR
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.UIElements;
using System.Reflection;
public static class EnterPlayModeTogglesToolbar
{
private const float PositionOffset = 10f;