Open HiddenStar0412 opened 6 years ago
Yes it can be done, see live demo
UploadFile is the js extension method and uses UnitySendMessage to communicate with C# code. Parameter is the name of gameobject and plugin calls that gameobject's "OnFileUploaded" method with a url. ( OnFileUploaded is hardcoded into js extension but you can change -or parameterize- it if you want)
I am going to load local image files in web GL. I use file path string without open dialog. Is it possible with your code?
what does it means? What is the parameter of "UploadFile" method?
[DllImport("__Internal")] private static extern void UploadFile(string id); public void OnPointerDown(PointerEventData eventData) { UploadFile(gameObject.name); }