Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 873 Bytes

Loading Images.md

File metadata and controls

25 lines (21 loc) · 873 Bytes

Loading Images

The Homebrew Way

Loading images is made easy, because Devs are nice people and made this function for us:

HBU.LoadTexture2D("path")

It's recommended to use Application.persistentDataPath though:

HBU.LoadTexture2D(Application.persistentDataPath.."/")

Application.persistentDataPath contatins the path

C:/Users/%USERPROFILE%/AppData/LocalLow/CopyBugPaste/Homebrew14

note: %USERPROFILE% is a Windows thing, so you can paste it into the Windows Explorer, and it's going to replace %USERPROFILE% with your user name.

So this AppData path is where most of the user-created files (including mods) are stored. It's recommended to put the required images into ModLua:

Application.persistentDataPath.."/Lua/ModLua/modImage.png"

so Users only have to copy-paste all the files into ModLua.

Author: Ryz