-
Notifications
You must be signed in to change notification settings - Fork 3
Download Images (NFTs)
Chain of Industry edited this page Oct 7, 2022
·
6 revisions
/// <summary>
/// Load an image from and URL and display it directly on an Image component when loaded
/// </summary>
/// <param name="imageURL">url to download image from</param>
/// <param name="displayComponent">the image component to display the picture</param>
public static void LoadImage(string imageURL, Image displayComponent, UnityAction<OperationStatus, string> CompleteMethod)
To be more clear, here is a full example of usage:
CORS - Access-Control-Allow-Origin
Access to fetch at 'https://website.com/imageurl'
from origin 'https://hostOfYourWebGLBuild.com'
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.