Skip to content

Instantly share code, notes, and snippets.

View arcueid-dev's full-sized avatar
🎯
Focusing

Arcueid D`athemon arcueid-dev

🎯
Focusing
View GitHub Profile
@arcueid-dev
arcueid-dev / README.md
Created March 9, 2024 17:41
Open Unity from bash or Fork

Open Unity Projects from Bash

This guide provides scripts to open Unity projects directly from the command line or through custom commands in Fork, a Git client.

Scripts Overview

  1. open-unity.sh: This script allows you to open a Unity project by specifying the project's path.
  2. fork-open-unity.sh: Similar to open-unity.sh, but tailored for integration with Fork's custom commands feature.

Usage Instructions

@arcueid-dev
arcueid-dev / GrabScreenFeature.cs
Created January 7, 2024 02:28 — forked from Refsa/GrabScreenFeature.cs
Unity URP custom grab pass
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
public class GrabScreenFeature : ScriptableRendererFeature
{
[System.Serializable]
public class Settings
@arcueid-dev
arcueid-dev / task_hooks.md
Created September 1, 2022 14:02 — forked from osulyanov/task_hooks.md
Git hooks for automatic reference issues in commit

Description

This hooks will remind you to reference task in your commit, and remember your task ref for branch. Your commit messages will have style "[reference] message"

Usage

  1. Create two files in your repo - e.g. [PROJECT_ROOT]/hooks/prepare-commit-msg.rb and [PROJECT_ROOT]/hooks/post-checkout.rb
  2. Copy to first file (here will assume that this is a [PROJECT_ROOT]/hooks/prepare-commit-msg.rb):
#!/usr/bin/env ruby
@arcueid-dev
arcueid-dev / TextGradient.cs
Created May 12, 2022 11:14 — forked from kirill2400/TextGradient.cs
Apply gradient to whole TMP text, but no for each character. Now correct for multiline
// ----------------------------------------------------------------------------
// The MIT License
// TextGradient https://gist.github.com/mopsicus/9d344451ca614d7e9937bc0c6da2b21d
// Copyright (c) 2020 Mopsicus <mail@mopsicus.ru>
// ----------------------------------------------------------------------------
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using TMPro;
@arcueid-dev
arcueid-dev / AccelerationMove.cs
Created May 10, 2022 11:45
Acceleration Move example calculations
using System;
using UnityEngine;
public interface IMovable
{
public Vector3 Forward { get; }
public Vector3 Position { get; }
public void Move(Vector3 vector3);
}
@arcueid-dev
arcueid-dev / SomeCustomComparer.cs
Created April 27, 2022 14:59
Custom comparer for dictionaries
public struct SomeCustom{
public static readonly SomeCustom Instance = new SomeCustom(System.Guid.NewGuid().ToString());
private SomeCustom(string guid)
{
Guid = guid;
}
public string Guid { get; }
@arcueid-dev
arcueid-dev / UnityWebRequestAwaiter.cs
Last active July 8, 2022 11:23
UnityWebRequest async/await
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;
public class Test : MonoBehaviour
{
public void Testing()
@arcueid-dev
arcueid-dev / DownloadHandlerFile.cs
Created April 27, 2022 14:29 — forked from luke161/DownloadHandlerFile.cs
Custom DownloadHandler for UnityWebRequest to stream contents into a file. Useful for preloading AssetBundles without them automatically being uncompressed and loaded into memory.
/**
* DownloadHandlerFile.cs
* Author: Luke Holland (http://lukeholland.me/)
*/
using UnityEngine;
using UnityEngine.Networking;
using System.IO;
public class DownloadHandlerFile : DownloadHandlerScript
@arcueid-dev
arcueid-dev / EventValue.cs
Last active July 27, 2022 17:05
Unity EventValue. Use this to avoid additional actions. Just set value to "Value" property and if it's different from stored, then action is invoked.
[Serializable]
public class EventValue<T>
{
[SerializeField] private T _value;
private Action<T> _action;
public event Action<T> OnValueChanged
{
add
{