Answer the question
In order to leave comments, you need to log in
How to create a resource in unity3d (Resources.Save())?
The unit can load resources: Resources.Load<type>(path), but I need to create a resource in the game and save it (like Resources.Save<type>(path) ) - but it doesn't. For example, I create a texture in the game and I want to save it so that I can read it later
Answer the question
In order to leave comments, you need to log in
At runtime, you can't save files to resources. You can save to temporaryCache, persistentDataPath and load from there.
You need to use the System.IO library and these 2 methods File.WriteAllBytes, File.ReadAllBytes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question