Images that I load from Resources folder are not included into the build
5. Srpen 2024 v 02:25
I am new to Unity.
What I do: on button click, I load an image from the "Resources" folder by Resources.Load(<file path>
) function. The file path is composed dynamically, depending on conditions. It works in editor, but they are not shown in the build.
It looks like Unity optimizes the assets folder while building, and if there is no explicit reference to an image, then it excludes it from the bundle? The files themselves are of small sizes, about ~10Kb each one, so it's not the file size that's the issue.
If I'm guessing right, what I can do to include those images into a build?
If not - what can be a reason for them to be absent in the build?