Skip to content

Instantly share code, notes, and snippets.

View Rabadash8820's full-sized avatar

Dan Vicarel Rabadash8820

View GitHub Profile
@AntonZhernosek
AntonZhernosek / UnityWebRequestExtension.cs
Last active August 13, 2023 04:45
UnityWebRequest doesn't support async/await operations natively. With this small extension, it now has an awaiter and can be cancelled via a CancellationToken
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using UnityEngine.Networking;
namespace UnityUtilities.Networking.Extensions
{
public static class UnityWebRequestExtension
{
public static async Task<UnityWebRequest.Result> SendWebRequestAsync(this UnityWebRequest request, CancellationToken ct = default)
@unitycoder
unitycoder / android-errors.md
Last active February 12, 2026 09:15
Unity Android Build Errors

cannot build and run to device

  • reconnect and turn usb cable upside down
  • or, reconnect, press the usb connection notification android, switch mode to tether or something else, then back to transfer (it should ask for [ ] allow debug from this device, yes)

google play complains: "Invalid Data safety declaration" Data safety (Device or other IDs not declared)

AR foundation forces unity analytics package into project.. maybe its due to that?

see what to fill: https://docs.unity.com/ugs/en-us/manual/analytics/manual/google-data-safety

@nemotoo
nemotoo / .gitattributes
Last active March 7, 2026 10:30
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@gogsbread
gogsbread / Reflections.cs
Created January 2, 2013 23:11
Comparing reflection using Mono.Cecil and .NET Reflection.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Mono.Cecil;
using System.IO;
class Reflect
{