A
A
AnzousDGC2019-05-16 05:07:59
Unity
AnzousDGC, 2019-05-16 05:07:59

Unity needs to load the sprite from an arbitrary folder (not from Resources). How to do it?

I am developing a map editor. We need to add the ability to create blocks directly from the program, and not through Unity itself. However, for this I need a folder in which the sprites will be stored, or rather, how can I download these sprites from there, if the user can add them there (to this folder)?
Using Resources.Load is not appropriate.
The code structure is as follows:
gameObject.GetComponent().sprite = sprite to get from an arbitrary folder.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MishkaVNorky, 2019-05-16
@MishkaVNorky

Folder StreamingAssets https://docs.unity3d.com/Manual/StreamingAssets.html
Put everything in it, after the build it will be like a separate folder where the player can make changes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question