Table of Contents
Handles embedded resources within Mod Helper mods
public static class ResourceHandler
Inheritance System.Object ResourceHandler
Map of created Audio Clips by Id
public static readonly Dictionary<string,AudioClip> AudioClips;
System.Collections.Generic.Dictionary<System.String,UnityEngine.AudioClip>
Map of loaded Asset Bundles by Id
public static readonly Dictionary<string,AssetBundle> Bundles;
System.Collections.Generic.Dictionary<System.String,UnityEngine.AssetBundle>
Map of raw embedded resource data by Id
public static readonly Dictionary<string,byte[]> Resources;
System.Collections.Generic.Dictionary<System.String,System.Byte[]>
Create an AudioClip from an mp3 file
public static AudioClip CreateAudioClip(NAudio.Wave.Mp3FileReader reader, string id);
reader
NAudio.Wave.Mp3FileReader
mp3 file reader
Id for AudioClip
UnityEngine.AudioClip
new AudioClip, or null if unsuccessful
Create an AudioClip from a wav file
public static AudioClip CreateAudioClip(NAudio.Wave.WaveFileReader reader, string id);
reader
NAudio.Wave.WaveFileReader
Wav file reader
Id for AudioClip
UnityEngine.AudioClip
new AudioClip, or null if unsuccessful
Creates a Sprite from a Texture2D
public static Sprite CreateSprite(this Texture2D texture, float pixelsPerUnit=10.8f);
texture
UnityEngine.Texture2D
Texture
pixelsPerUnit
System.Single
Pixels per Unit to use
UnityEngine.Sprite
new Sprite
Creates or gets a texture from its Id
public static Texture2D GetTexture(string id);
Texture id "ModName-FileName" (no file extension)
UnityEngine.Texture2D
The texture