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/
Related
I started to make a project on a Windows computer and uploaded it via GitHub. Later I wanted to download it on my Mac. But when I start the project on MacOS Unity the scene is empty and all prefabs are missing. Every time when I check GitHub it is deleting a lots of meta.files. When I discard the deletion, all meta.files are deleted again as soon as I start the project on my Mac.
Getting back to Windows GitHub says that everything is pushed. Referring to that article (https://medium.com/codex/solving-the-missing-prefab-issue-in-unity3d-ae5ba0a15ee9) the problem appears similar. But the solution does not help.
What is the problem to get my project from Windows to Mac via GitHub?
"Unity deletes .meta files":
After some research the answer to this seems to be - Unity removes .meta files when the corresponding object is missing.
"Prefabs are missing":
GitHub on my windows computer did not commit the .obj files. It took me a while to figure out that somehow a "gitignore_global.txt" was installed from somewhere (maybe GitHub Desktop?). .obj files were included to be ignored. That "gitignore_global.txt" is located in:[x:/User/Documents]
If you face the same problem - check the gitignore-file in your Unity project too. If certain file types are prohibited via one of these 2 files - no chance!
Cheers
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!
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.
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.
I always use one folder on my filesystem for an Xcode project. It contains all project files. When I zip it and send it to a friend, she can't just ipen the xcodeproj file. It opens, but all paths are broken and build fails because all the classes don't find the #include'd files. But when I download i.e. some example projects from apple, these work perfectly. What am I doing wrong?
UPDATE:
I'm doing it like this:
1) I create a project and specify an directory on my desktop
2) In that directory I create an "images" directory and add images to it
3) I pull this images directory out and drag it into the Resources Groups&Files. Xcode asks if I want to copy it to destination folder, I click no. Because it's already there. All other things are set to default.
4) all other things are just created within xcode, and xcode just puts all classes in the Classes directory of my project.
5) when I want to add images, I first put them in the directory of the project, and from there drag them into the Images group in xcode. That's to make sure xcode doesn't mess them up with everything else. Otherwise it would just copy them to the root of my project directory rather than inside the Images directory, which doesn't make sense. In fact, the whole Groups&Files filesystem doesn't make sense at all, it's one big mess. Apple's biggest mistake in Xcode so far. That's why I have to do such stupid things.
We don't really know exactly what you're doing so it's hard to see what you're doing wrong.
Perhaps inspect the xcode project files directly, see if you have hardcoded paths. That's a sure fire problem. Make sure you copy resources into the project instead of referencing them externally, etc.
I expect that you have "search path" build setting set to an absolute path on your machine, rather than a path relative to the project. Best way to tell is to post a portion of the build transcript from the failed build and look at the -I directives. If those paths don't exist on your friend's machine, then they should be changed from absolute paths to paths that start with ${SRCROOT}.
Are you just trying to build on the second machine or are you trying to deploy to a device on the second machine? If you are trying to deploy to a device (iPhone or iPod Touch) then it probably has something to do with Code Signing and Certificates.