Skip to content

Instantly share code, notes, and snippets.

View Gustorvo's full-sized avatar

Gustorvo Gustorvo

View GitHub Profile
@Gustorvo
Gustorvo / TextureModifier.cs
Last active September 3, 2024 19:32
The TextureModifier class enables advanced texture manipulation and analysis in Unity using the Job System and Burst Compiler for efficient parallel processing. It's optimized for high-performance texture editing, suitable for painting tools, procedural texture generation, and real-time modifications in games or simulations.
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Unity.Burst;
using Unity.Collections;
using Unity.Jobs;
using Unity.Mathematics;
using UnityEngine;
using Debug = UnityEngine.Debug;
@Gustorvo
Gustorvo / package.json
Last active September 4, 2024 13:01
Unity package manifest file for XR setup (URP) for Meta
{
"dependencies": {
"com.gustorvo.tools": "https://github.com/Gustorvo/Editor-Tools.git",
"com.dbrizov.naughtyattributes": "https://github.com/dbrizov/NaughtyAttributes.git#upm",
"com.meta.xr.sdk.all": "68.0.1",
"com.unity.ide.rider": "3.0.31",
"com.unity.render-pipelines.universal": "14.0.10",
"com.unity.textmeshpro": "3.0.9",
"com.unity.ugui": "1.0.0",
"com.unity.xr.interaction.toolkit": "2.5.4",
@Gustorvo
Gustorvo / QuaternionExtensions.cs
Created May 28, 2021 12:24
Some of the Quaternion Extensions for Unity
using UnityEngine;
public static class QuaternionExtensions
{
/// <summary>
/// Converts rotation into its euler angles representaion (in degrees) in range [-180, 180].
/// </summary>
/// <param name="q"></param>
/// <returns></returns>
public static Vector3 ToEulerAnglesInRange180(this Quaternion q)
@Gustorvo
Gustorvo / ArtBodyExtensions.cs
Last active February 7, 2025 02:05
Extension methods for working with ArticulationBody component for Unity
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// Extension methods for working with ArticulationBody component for Unity
/// </summary>
public static class ArtBodyExtensions
{
/// <summary>
/// Sets an articulation body drive target rotation to match a given targetLocalRotation.