Skip to content

Instantly share code, notes, and snippets.

@shane-harper
shane-harper / AppManager.cs
Created November 17, 2023 16:30
An editor window in Unity for installing and uninstalling apps via ADB. I had started to use SideQuest out of convenience over adb command line, but thought it'd be nice to not leave Unity and void the adverts. I had originally planned to do the file explorer too, hence the View abstract class, but felt it wasn't worth the time investment for ho…
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using UnityEditor;
using UnityEngine;
using Debug = UnityEngine.Debug;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
/// <summary>
/// A component for adding annotations to GameObjects in a scene
/// </summary>
[AddComponentMenu("Annotation")]
using System;
using System.Collections.Generic;
using UnityEngine;
public class Example : MonoBehaviour
{
[SerializeReference] public List<IExampleInterface> List = new();
}
#if UNITY_EDITOR
using System;
using UnityEngine;
#if UNITY_EDITOR
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using UnityEditor;
#endif
using System;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// A generic pool manager for managing instances of Unity components.
/// This class allows for efficient reuse of components by maintaining a pool
/// of inactive instances that can be activated and returned as needed.
/// </summary>
/// <typeparam name="T">The type of Unity Component to pool. Must be a class derived from Component.</typeparam>