Skip to content

Instantly share code, notes, and snippets.

View webmonch's full-sized avatar

Vladyslav Melnychenko webmonch

View GitHub Profile
@thsbrown
thsbrown / DOTweenBehavior.cs
Created August 17, 2022 19:47
DOTween + Unity Timeline Example
public class DOTweenBehavior : PlayableBehaviour
{
public bool tweenPosition;
public Vector3 targetPosition;
public bool tweenRotation;
public Vector3 targetRotation;
public Ease ease;
private bool firstFrameProcessed;
private Sequence sequence;
@AbstractUmbra
AbstractUmbra / 00-deprecation.md
Last active May 23, 2024 12:29
discord.py 2.0+ slash command info and examples

This gist has now been 'deprecated' and has moved...

... to my blog style space for easier contribution by third parties and to provide what I believe to be an easier reading experience. Please field all enquiries and issues to the source repository.

provider "aws" {
version = "~> 2.0"
region = "eu-west-2"
}
# Providing a reference to our default VPC
resource "aws_default_vpc" "default_vpc" {
}
# Providing a reference to our default subnets
@corrieriluca
corrieriluca / App-Store-Connect-API-Python.md
Last active April 23, 2024 04:50
Connection to the App Store Connect API using Python3
@Vonflaken
Vonflaken / VirtualJoystick.cs
Last active June 1, 2021 02:36
Virtual joystick component for Unity mobile projects.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
#if UNITY_EDITOR && !UNITY_CLOUD_BUILD
using UnityEditor;
#endif
@kdrzymala
kdrzymala / InjcetableFeature.cs
Last active January 4, 2023 08:26
A feature that's Injectable by Zenject
using Entitas;
using Zenject;
using System.Collections;
using System.Collections.Generic;
public class InjectableFeature : Feature
{
public InjectableFeature()
: base()
{
@LotteMakesStuff
LotteMakesStuff / 1.md
Last active January 5, 2023 20:54
UPM: How to make a custom package

UPM: How to make a custom package So, Unity has this shiny new package manager, and you have code you want to share between projects - wouldn't it be great if we could bundle up our shared code and plug it into all the projects that need it? Let's figure out how to make our own Package!


Todo

  • Modify the project manifest
  • Make a package manifest
  • Package the manifest up with some test code
  • Try it out in Unity!

@dLopreiato
dLopreiato / ConvexHull.cs
Last active July 4, 2023 21:39
Code Complete Convex Hull c# for Unity
/* This is taken from this blog post:
* http://loyc-etc.blogspot.ca/2014/05/2d-convex-hull-in-c-45-lines-of-code.html
*
* All I have done is renamed "DList" to "CircularList" and then wrote a wrapper for the generic C# list.
* The structure that is supposed to be used is *much* more efficient, but this works for my purposes.
*
* This can be dropped right into your Unity project and will work without any adjustments.
*/
using System.Collections.Generic;
using UnityEngine;
@davehampson
davehampson / ShipCamera.cs
Last active January 31, 2023 23:21
Framerate independent blend
using UnityEngine;
public class ShipCamera : MonoBehaviour
{
public GameObject m_Ship;
public Vector3 m_RelativePos;
void LateUpdate()
{
//float scale = 0.05f; // Framerate dependent code, bad.
@LotteMakesStuff
LotteMakesStuff / CustomInspectorCreator.cs
Last active May 16, 2024 07:08
Editor extension that adds a tool to automagically generate boilerplate custom inspector code~ YES! Just drop it into a folder called 'Editor' and it adds a 'custom inspector' option into the Project window!
using UnityEngine;
using UnityEditor;
using System.IO;
public static class CustomInspectorCreator
{
[MenuItem("Assets/Create/Custom Inspector", priority = 81)]
static void CreateInsptorEditorClass()
{
foreach (var script in Selection.objects)