Skip to content

Instantly share code, notes, and snippets.

View listopad's full-sized avatar
🎯
Focusing

Artem listopad

🎯
Focusing
View GitHub Profile
@sinbad
sinbad / TooltipPanel.cs
Last active September 25, 2021 17:25
Simple Unity UI tooltip system (requires DoTween)
using DG.Tweening;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
// Attach this component to a UI object which will be the tooltip visual
// Must include some text somewhere of course, and optionally a CanvasGroup if you want fading
public class TooltipPanel : MonoBehaviour {
[Tooltip("The text object which will display the tooltip string")]
public TextMeshProUGUI tooltipText;
@LotteMakesStuff
LotteMakesStuff / AutohookAttribute.cs
Last active July 1, 2024 09:54
[Autohook] property drawer for unity - Add this [Autohook] attribute to a property to and the inspector will automagically hook up a valid reference for you if it can find a component attached to the same game object that matches the field you put it on. You can watch a demo of this in action here https://youtu.be/faVt09NGzws <3
// NOTE DONT put in an editor folder!
using UnityEngine;
public class AutohookAttribute : PropertyAttribute
{
}
@HiromuKato
HiromuKato / Cat.cs
Last active November 7, 2019 20:51
ねこちゃんオブジェクトを表示するスクリプト
using UnityEngine;
using UnityEditor;
[ExecuteInEditMode]
public class Cat : MonoBehaviour
{
public bool good = true;
[MenuItem("GameObject/3D Object/Cat", false, 10)]
static void CreateCat(MenuCommand menuCommand)
{
@quaternioninterpolation
quaternioninterpolation / ImageDOCrossfade.cs
Last active May 11, 2024 09:51
DOTween UnityEngine.UI.Image image cross fade
/** --
** Copyright (C) 2019 by Josh van den Heever
**
** Permission is hereby granted, free of charge, to any person obtaining a copy of
** this software and associated documentation files (the "Software"), to deal in
** the Software without restriction, including without limitation the rights to
** use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
** of the Software, and to permit persons to whom the Software is furnished to
** do so, subject to the following conditions:
**
@DanMillerDev
DanMillerDev / LightEstimation.cs
Created July 31, 2018 18:03
Light Estimation for ARFoundation
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Experimental.XR;
using UnityEngine.UI;
using UnityEngine.XR.ARFoundation;
[RequireComponent(typeof(Light))]
public class LightEstimation : MonoBehaviour
{
@fizvlad
fizvlad / vk-audio-downloader.js
Last active December 27, 2022 16:09 — forked from abler98/vk-audio-downloader.js
<UPD> Нерабочий </UPD> Скрипт для скачивания музыки VK
/*
Инструкция по использованию:
- Заходим в раздел с аудиозаписями
- Листаем в самый низ (Чтобы прогрузились все аудиозаписи) (Можно зажать клавишу PageDown)
- Открываем консоль браузера (F12 -> Консоль)
- Вставляем код и нажимаем Enter
- Скачивание началось...
- Браузер может потребовать разрешение на сохранение файлов, необходимо подтвердить действие
- Оставляем браузер на время прямо пропорциональное количеству аудиозаписей :)
using System;
using UnityEngine;
[AttributeUsage(AttributeTargets.Field)]
public class MinMaxSliderAttribute : PropertyAttribute
{
public readonly float max;
public readonly float min;
// Shader created with Shader Forge v1.38
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/
// Note: Manually altering this data may prevent you from opening it in Shader Forge
/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:2,rntp:3,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:1,fgcg:1,fgcb:1,fgca:1,fgde:0.01,fgrn:5,fgrf:15,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:4904,x:33076,y:32617,varname:node_4904,prsc:2|diff-5996-OUT,clip-8651-A;n:type:ShaderForge.SFN_Color,id:848,x:32
@robsonbramos
robsonbramos / UISlideTween.cs
Last active June 23, 2020 11:45
Inspector editor to quick set DOTween UI animation in Unity
using System.Collections;
using DG.Tweening;
using UnityEngine;
using UnityEditor;
public class UISlideTween : MonoBehaviour
{
[HideInInspector]
public Vector3 enterPosition, enterScale, targetPosition, targetScale, exitPosition, exitScale;
[HideInInspector]
@reidscarboro
reidscarboro / LoadingDots.cs
Created May 10, 2017 13:29
Bouncing loading dots in Unity using DoTween
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
public class LoadingDots : MonoBehaviour {
//the total time of the animation
public float repeatTime = 1;
//the time for a dot to bounce up and come back down