yasirkula / UnityNativeCamera

A native Unity plugin to take pictures/record videos with device camera on Android & iOS
MIT License
609 stars 71 forks source link

LoadImagefromPathAsync example code #103

Closed jinincarnate closed 1 year ago

jinincarnate commented 1 year ago

Hi can u give a sample code on how to use the async version of LoadImagefromPath

yasirkula commented 1 year ago

Sure! Instead of Texture2D texture = NativeCamera.LoadImageAtPath( path, maxSize );, you should call Texture2D texture = await NativeCamera.LoadImageAtPathAsync( path, maxSize ); in an async function.