Skip to content

Instantly share code, notes, and snippets.

@Avatarchik
Avatarchik / DrawSizeGizmo.cs
Created March 6, 2023 10:30 — forked from agermanidis/DrawSizeGizmo.cs
Draw Size Gizmo - Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[ExecuteInEditMode]
public class DrawSizeGizmo : MonoBehaviour {
public bool enabled = true;
void OnDrawGizmos () {
@Avatarchik
Avatarchik / UnitypackageExtractor.cs
Created September 15, 2022 07:36 — forked from yasirkula/UnitypackageExtractor.cs
Extract a .unitypackage to any directory (even outside the project folder) from within Unity
#define STOP_EXTRACTION_WHEN_WINDOW_CLOSED
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Reflection;
using System.Text;
using System.Threading;
using UnityEditor;
@Avatarchik
Avatarchik / RadialTimer
Created August 11, 2022 09:44 — forked from codorizzi/RadialTimer
Unity - Radial Timer Bar
/*
* Author - https://twitter.com/JSqearle
* License - CC BY-SA
* Asset Dependencies:
* - https://assetstore.unity.com/packages/tools/sprite-management/shapes2d-procedural-sprites-and-ui-62586 (Free)
* - https://assetstore.unity.com/packages/tools/utilities/odin-inspector-and-serializer-89041 (optional - can be removed)
* - https://assetstore.unity.com/packages/tools/animation/dotween-hotween-v2-27676 (Free)
*/
using DG.Tweening;
@Avatarchik
Avatarchik / FeaturesAcceleratedSegmentTest.cs
Created August 9, 2022 20:26 — forked from unitycoder/FeaturesAcceleratedSegmentTest.cs
FAST Algorithm for Corner Detection (Unity)
// unity version : https://unitycoder.com/blog/2019/05/09/fast-algorithm-for-corner-detection-in-unity/
// NOTE this is not optimized in any way
// original source https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_feature2d/py_fast/py_fast.html
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class FeaturesAcceleratedSegmentTest : MonoBehaviour
@Avatarchik
Avatarchik / SlowRevealScript.cs
Created July 13, 2021 09:23 — forked from firebellys/SlowRevealScript.cs
A slow reveal script with paging support for TextMeshPro
// Copyright (C) 2014 - 2016 Stephan Bouchard - All Rights Reserved
// This code can only be used under the standard Unity Asset Store End User License Agreement
// A Copy of the EULA APPENDIX 1 is available at http://unity3d.com/company/legal/as_terms
using System.Collections;
using TMPro;
using UnityEngine;
namespace Assets.Scripts
{
@Avatarchik
Avatarchik / ImageDOCrossfade.cs
Created September 21, 2020 11:39 — forked from quaternioninterpolation/ImageDOCrossfade.cs
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:
**
@Avatarchik
Avatarchik / UISlideTween.cs
Created June 23, 2020 11:45 — forked from robsonbramos/UISlideTween.cs
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]
@Avatarchik
Avatarchik / SlicedFilledImage.cs
Created May 20, 2020 21:02 — forked from yasirkula/SlicedFilledImage.cs
Combining UI Image's Sliced+Filled features together in Unity
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
#if UNITY_2017_4 || UNITY_2018_2_OR_NEWER
using UnityEngine.U2D;
#endif
using Sprites = UnityEngine.Sprites;
#if UNITY_EDITOR
@Avatarchik
Avatarchik / GameHost.cs
Created February 12, 2020 19:47 — forked from Vanlalhriata/GameHost.cs
Host Unity game in WPF
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Interop;
namespace KinectRun.Host.Controls
{
// GameHost is a FrameworkElement and can be added to controls like so:
// var gameHost = new GameHost(container.ActualWidth, container.ActualHeight);
@Avatarchik
Avatarchik / Transform.java
Created July 25, 2017 19:13 — forked from prodigga/Transform.java
3D transform system similar to Unity3D for libGDX
package com.pigeoncoop.extensions;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.math.*;
import com.badlogic.gdx.utils.Array;
/**
* 3D transform system similar to Unity3D for libGDX
* @author Tim Aksu - [email protected]
*/