Skip to content

Instantly share code, notes, and snippets.

View Baste-RainGames's full-sized avatar

Baste Nesse Buanes Baste-RainGames

View GitHub Profile
@Baste-RainGames
Baste-RainGames / GitInterop.cs
Last active May 10, 2019 12:14
Git interop from Unity
using System;
using System.Diagnostics;
using System.Linq;
using System.Text;
using UnityEngine;
namespace RainEditor.EditorTools {
public class GitInterop {
/// <summary>
/// Runs a git command and returns the result. Assumes you have git installed and on the PATH.
@Baste-RainGames
Baste-RainGames / DragAndDropService.cs
Last active May 31, 2022 06:04
Interaction with Unity's DragAndDropService
using System;
using System.Reflection;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
// This class gives access to Unity's internal DragAndDropService class through reflection, and exposes the same methods.
// See https://github.com/Unity-Technologies/UnityCsReference/blob/f50ab75c509cab05254e0ff2f06eb74f5ecd30da/Editor/Mono/DragAndDropService.cs
namespace RainDragAndDropService {
public static class DragAndDropService {