New answers tagged

0

Expanded post on comment:"JSON is just a means of storing text information right? Why not just hold a path to the sprite in the JSON file? Then whenever you obtain the information in the JSON file, call Resources.Load (jsonPath); ?" The JSON language cannot directly load Sprites into Unity3D. However, as JSON can deal with strings, we can quite easily hold ...


0

Looks like putting images in asset folder and loading them using BitmapFactory.decodeStream(ins) would increase loading speed a lot. See this post for details


1

You're on the right track in the comments above when you ask whether the WWW class could help. This is how I've solved the problem in the past for asynchronously loading local image files as Texture2D data: Texture2D _content; Material _material; // Call this with StartCoroutine(LoadTexture(path)); IEnumerator LoadTexture(string path) { // Start the ...


0

You can fire off a C# thread to load the image from a file, and get as far as turning it into a color array, with which you can quickly set a texture. So assuming you have some class AsyncImage with a function loadMyImage() which sets a Color[] pixels member variable, you could do something like: Thread t = new Thread(new ...



Top 50 recent answers are included