🖼 A powerful, easy-to-use image downloading and caching library for Unity in Run-Time! 😎
Simple usage - Single line of code and ready to go!
Davinci.get().load(imageUrl).into(image).start();
🔴 Update : Support for any type of Renderer components has been added. now we can download 3D model's textures in run-time!
Davinci.get()
.load(url)
.setLoadingPlaceholder(loadingTexture)
.setErrorPlaceholder(errorTexture)
.into(image)
.start();
Davinci.get()
.load(url)
.setFadeTime(2) // 0 for disable fading
.into(image)
.start();
Davinci.get()
.load(imageUrl)
.into(image)
.withStartAction(() =>
{
Debug.Log("Download has been started.");
})
.withDownloadProgressChangedAction((progress) =>
{
Debug.Log("Download progress: " + progress);
})
.withDownloadedAction(() =>
{
Debug.Log("Download has been completed.");
})
.withLoadedAction(() =>
{
Debug.Log("Image has been loaded.");
})
.withErrorAction((error) =>
{
Debug.Log("Got error : " + error);
})
.withEndAction(() =>
{
Debug.Log("Operation has been finished.");
})
.start();
You can simply cache downloaded images so Davinci won't download it again from the same url. It's cool! Isn't it? 😁
(Default is True
)
Davinci.get().load(imageUrl).setCached(true).into(image).start();
Also you can clear Davinci cached files:
//For a certain file
Davinci.CleareCache(imageUrl);
//For all files
Davinci.ClearAllCachedFiles();
Also:
- Supports Unity UI Image Component
- Compatible with all platforms and unity versions.
- Standalone Builds
- Android
- iOS
- WebGl
Clone the project. Open Davinci/Assets in unity or import the UnityPackage to your existing project.
You can see lots of examples in Assets/Examples
Please see the Wiki page for more information and examples
Want to contribute? Great!
Make a change in your file and instantaneously see your updates!
- Add support for textures ✅
- Improvements
Davinci is available under the MIT license. See the LICENSE file for more info.