How to put JavaScript in your assets and NOT have it compiled?
It use to be you could put .js files in Assets/WebPlayerTemplates and Unity would not try to compile them as they were meant for the browser, not for unity.
As of 2018.2.7F1 that no longer seems to work. Unity is trying to compile those JS files even though they are meant for the browser (I get the WebPlayer is no longer supported but I'm not using them for the webplayer)
Supposedly I can make WebGL templates in Assets/WebGLTemplates and putting an .HTML file there works but putting a .JS file there Unity tries to compile them.
Is there a way to get unity to NOT compile .js files? Put them in some special named folder? At some meta file? What?
Answer by Schubkraft · Oct 17, 2018 at 03:19 PM
I took a look and the as a workaround you can just reopen your project and the compile errors should go away. If they don't please open a bug report as described under https://unity3d.com/unity/qa/bug-reporting
Answer by greggman · Oct 17, 2018 at 04:52 PM
Well, my solution back then was just to rename all the files to some other extension like "blablabla.my-js". It sucks because I can't just leave the files as ".js" and any browser libraries I add have to have all there references renamed but at least Unity didn't try to compile them