So I 've been trying to google my way through this problem but I am stuck. I decided to post mainly because what I want to do would probably work with many workaround solutions. I have completed a couple of windows builds before but never a WebGL.
Now during my application runtime I 'm already doing something that a typical Unity Game wouldn’t need to do and that is : User inputs data by:
a) browses for a .txt file and the file contents get parsed or
b)the text from clipboard is read.
Initially I was using “EditorUtility.OpenFilePanel” and after I got everything else working the project wouldn’t build (duh! EditorUtility is only for editing -.- ).
So I switched the whole process to a popup GUI filebrowser and that was that.
NOW I am trying to build a WebGL version and neither “a)” nor “b)” options work. I understand from what I googled,that this happens because you can’t access local data from a webGL app and that the clipboard is inaccessible due to browser security reasons.
tl;dr
HOW can a user feed a couple of txt files or copied text to a WebGL app when clicking on a “input data” GUI button?
There is a thread about loading an image from the user hard drive into WebGL application. You should be able to use the very same approach to open a user text file through the Open File dialog in the browser https://forum.unity3d.com/threads/how-do-i-let-the-user-load-an-image-from-their-harddrive-into-a-webgl-app.380985/#post-2474594
Note that you can also make it work both in the editor and in the browser depending on the UNITY_EDITOR define (explained in the mentioned thread). Let me know if you need any help with this.