export Unity3D to WebGL as one file - unity3d

Is it possible to export Unity3D to WebGL as one file?
I cant find any instructions how it can be done.
Thanks for advices!

A Unity3D WebGL build has to be multiple files when it's exported. That's just how Unity structures it's WebGL builds. There's usually an index.html file, as well as 3 or more folders with data on the same level. The majority of the game in contained within two files called "html.data" and "html.js". Most of the other files are config files.
You can zip that entire directory into one file for ease of transport, but you cannot build a single file output.

Related

After Unity build the game it cannot read CSV files from Resources folder

I develop a game that reads, constantly, multiple datasets from a subfolder in the Assets/Resources folder of Unity.
While in the development mode the game works fine, when I build the game (I tried in all platforms - Mac OS, Windows x 86_64, Windows 86, WebGL) it seems that it cannot read the CSV files from the resource folder and does not behave as expected. The size of the Resources file is not large (7MB).
Is there any restriction in loading files from the Resources folder in build mode?
I load the CSVs with Resources.Load<TextAsset>("folder/" + dataset);
It is better to put the entire path of .csv file!

How to include custom library files in Unity build

When I run my Unity app in the editor, it is able to read my .dlls and other custom files the .dlls need and it works fine. However, when I make a build, it only includes the .dll files in the Plugins folder of the build and not the other custom files. Is there a way to force Unity to include the other files as well? I have tried putting them both in the Plugins and Resources folder before building and in both cases it only keeps the .dlls.
The custom files are .obf, but I don't think that's relevant
It is extremely relevant. Unity does not support all type of libraries.
Here are the supported library extensions:
For Windows, you can use .dll.
For Linux, .so is supported.
For Android, you can only use .aar, rar and .so.
For iOS, .a is used but you can also use the non compiled code such as ,.m,.mm,.c and .cpp.
There is no support for .obf. If you want to add it to your project so that you can load and execute it then you are out of luck.
If you just want to make Unity include it to your final project build so that you can read it then you can. This doesn't mean you can load and execute it.
First, rename the extension from ".obf" to ".bytes". Place it in the Resources folder and read it as TextAsset with the Resources.Load function. You can the access the data with TextAsset.bytes.
TextAsset dataAsset = (TextAsset)Resources.Load("YourObfName", typeof(TextAsset));
byte[] data = dataAsset.bytes;
Not sure how helpful just reading it is but this is here to show you how to include it to the build and read it but you can't execute it unless there is a C# API to do so and I don't think that any API of such kind exist.

script to auto move a folder with movie file

I have a download folder that is the destination for all torrent download files. I want a script which monitors that folder and then automatically only copy, moves the complete folder containing the movie file (mkv,avi,mp4...etc) and ignores everything else in the download folder. Is it possible
Thanks and Regards
Sammy
Which scripting language would you like to use? What OS are you on? It is quite possible, and if you chose Python as your scripting language, you would be able to find many useful scripts that do what you want.

Unity Resources folder not included in desktop build

There seems to be some file size limit on the Resources folder before it stops being included in the build. We built for both Windows and Mac and neither include the files in the Resources folder. I'm trying to narrow it down to the exact file size where it stops working, but I'm currently around 160MB with it not working, and it works fine at around 80MB.
We've tried the following:
Resources.Load(filepath);
Resources.Load<GameObject>(filepath);
Resources.Load(filepath) as GameObject;
The files are txt files, 3DS files, and png files.
Our Resources folder is in the root of the Assets folder, so it should be included in the build.
Any ideas?
Edit:
I've asked on Unity's forum here: http://forum.unity3d.com/threads/resources-folder-not-included-in-desktop-build.350468/

Can I extract my apk file to retrieve lost files?

I've been working on a mobile game in Unity for over a month, saving all my work to OneDrive. Today I restarted my computer and when it loaded back up I tried opening my project and it failed. I looked through my OneDrive and half my files are missing! I've been on the phone with Microsoft support all day and I can't get those files back.
I have the apk file for the game loaded onto my phone. Is there anyway to reverse build this thing back onto Unity or just get the files back from the apk file ?
If by APK you mean Android's APK file you can just 'unzip' it and get at least you xml files and other resources such as images. All classes will be packed to classes.dex file, which can be converted to Java's JAR by dex2jar tool. However JAR will give you only Java's binaries. You could further de-compile them to Java files, but they are not going to look pretty or very readable.
Well, at least you can recover you XML layouts.
Are the files in your recycle bin on the OneDrive website or locally? Often times when OneDrive files go missing they can be found there.