/// <summary> /// Gets the byte representation of the file with the specified name. The name is in the format of "ModFolder/OtherFolders/FileNameWithExtension". Throws an ArgumentException if the file does not exist. /// </summary> /// <exception cref="MissingResourceException">Missing mod: " + name</exception> public static byte[] GetFileBytes(string name) { SplitName(name, out string modName, out string subName); Mod mod = ModLoader.GetMod(modName); if (mod == null) { throw new MissingResourceException("Missing mod: " + name); } return(mod.GetFileBytes(subName)); }