Skip to content

Instantly share code, notes, and snippets.

View corytrese's full-sized avatar

Cory Trese corytrese

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
@corytrese
corytrese / UIPlayAudioWWise.cs
Created June 22, 2020 20:26
MonoBehaviour that Connects WWise AKEvents to Unity IEventSystemHandler
using UnityEngine;
using UnityEngine.EventSystems;
namespace RPG.Audio
{
[AddComponentMenu("UI/Audio/Play Audio WWise")]
public class UIPlayAudioWWise : MonoBehaviour, IEventSystemHandler, IPointerEnterHandler, IPointerExitHandler, IPointerDownHandler, IPointerUpHandler
{
public enum Event
{
using System;
using System.Collections.Generic;
namespace RPG.Util {
public static class RandomExtensionMethods
{
/// <summary>
/// Returns a random long from min (inclusive) to max (exclusive)
/// </summary>
/// <param name="random">The given random instance</param>