I've put together the first playable build of a game and I'd like to send it to a couple friends to make sure everything so far is working as intended. The project so far just consists of a single main game scene, and that scene works in the editor; it plays without issue. I opened build settings, included the main game scene as the only scene in the build, and had Unity make a standalone Windows x86 executable build.
Unity created the build without issue. When I run the executable, a short "Made with Unity" splash screen appears, and then...
...nothing.
No part of the scene is displayed. The program stops responding as soon as the splash screen is done.
I wish I could provide more information, but unfortunately, this is all I have. No error messages appear beyond the standard "this program has stopped responding, wait or kill?". No log file is produced. Unity is surprisingly unhelpful in finding the cause of this problem.
I tried making a WebGL build, as well. This took a few minutes, but this build worked as intended. It ran just as smoothly as it did in editor. However, I would greatly prefer a standalone executable if at all possible.
Any ideas as to what could possibly be wrong?
After trying everything and the kitchen sink, I finally managed to create a working standalone executable by downgrading the Unity version I was using from 2020.2.0f1 to 2019.4.20f1. More specifically, I created a new blank project using the 2019... version, copied everything from the Assets folder over, and made a build.
I don't have a clue why this worked. I don't know if it's because there's a problem in the 2020... version, or if there's a problem in my particular installation of it, or if something in my code doesn't play nice with a standalone executable, or any of various other theories. All I know is, this worked.
Related
I'm working on my app in XCode 13, with a target deployment of iOS 13. I'm trying to implement SwiftUI, but all Canvases refuse to load. If I select Resume, the preview will pause again without ever loading.
There are no error messages, the preview just pauses again.
I found a similar question on here, but none of the solutions have worked for me. My account isn't at the level yet where I could leave a comment on it.
So far I have tried the following:
Set Enable Previews in build settings to "Yes"
Checked off "For install builds only" on all possible items in Build Phases
Wrapped build phases scripts in an if statement to check if Previews are enabled
Made a clean build, cleared all derived data.
Deleted local repository copy and reinstalled from GitHub
Restarted computer
added #if DEBUG and #endif to preview code
Made sure Xcode is not in Legacy Build system.
Other Info:
App does not use CoreData, and the previews do not involve API calls.
App is rather large, its size might have something to do with it?
Xcode will not even show preview for basic "Hello World!" default SwiftUI view.
I'm kind of at a loss at this point as to what else to try.
Please let me know if you have any other questions or suggestions.
Creating a new SwiftUI file was the only thing that worked for me. You can delete it again after the preview recompiles.
Take a look at the process SimRenderServer in activity monitor, I think it's this run that Xcode has to relaunch.
so my Unity worked fine until now, last time I built the game was yesterday and everything worked fine. Since yesterday the only thing that I did is that I changed some colliders and removed facebook gamecenter plugin. Now, when I try to play the game, everything is fine, but when I try to build it, it starts giving me 250 errors in total.
The last error always says :
"Error building Player because scripts had compiler errors"
Others error are connected to the standard assets.
Screenshots:
For some reason this happens. There a few options of fixing it, but the easiest one to simply re-install Unity.
PS: You wont lose any data.
http://prntscr.com/cfakce this is what happened when I'm entering any script, when I'm changing to mobile input this show up http://prntscr.com/cfalpw.
Whenever I'm trying to build the project or changing platform it crashes.
I changed my win7 to win10 (had to) and I think it may screwed my project but I'm not really sure, tried to search on Google for those errors and found nothing.
Someone told me on the Unity forum that it had something to do with UnityEditor but didn't had really idea how to fix it.
When I had win7 (before the change) everything worked perfectly fine.
Any ideas?
Unity version: Unity 5.4.0f3 (64-bit) thought it might help.
new: When I'm writing using at the start of any script it doesn't complete it to Unity.Engine or Unity.Editor it doesn't even have this option, like it got deleted or something. How do I bring back those Unity.editor and engine? I think it's the real problem :)
Another thing is that when I got win10 the C drive is now F and I've got new SSD drive which is the new C, everything stayed on the C drive but they didn't work or was used perfectly, so I redownloaded everything like Skype, steam, Origin and of course UNITY, the project folder I dragged to my desktop and then opened the game folder on this Unity I downloaded, I think that's what made the problem because when i enter Unity and press open, and going back to F drive>users>myname>dekstop>UNITY>mygame and open it in that path instead of what i have dragged (which it the same folder but on different place) it let me switch platform, does not let me build but at least it's not crashing just giving me the same errors without crashing, i don't know if this has something to do with but just gave the info cause maybe you will find this helpful to help me.
I'm developing a new application for Iphone, using Xcode (Version 4.6 (4H127)) and the iPhone 6.1 simulator (VersiĆ³n 6.0 (369.2)).
At the beginning everything was great: every time I pressed the "run" button, the application was loaded into the simulator and I was able to test it. But sometimes it is not working: when I press the run button, I only get the message "Finished running on iPhone 6.1 Simulator". The code successfully compiles (only minor warnings).
The main problem is that when I get this message, the only way I can use the simulator again (in this project, the rest of the xcode projects seems to work properly) is by starting a new project and adding every file to it.
I've tried to delete de derived data, restart de simulator, restart de computer, etc. Even I made a snapshot when the simulator was working, but when I go back to the snapshot state, the simulator still don't work.
What can I do? Any idea?
1.Manually launch the iOS Simulator.
2.From the "iOS Simulator" menu, click "Reset content and settings",
3.Close and rebuild your app.
This problem may arise when you have problems with your project's plist's target membership. Select your info plist file from project navigator folder structure's Supporting Files, go to interface builder pane(Utilities Section under View in Top Bar), then look for Target Membership in File Inspector pane, if it is checked, uncheck it. Clean & Build, Hope it helps.
Library > Application Support > iPhone Simulator > 6.1 (or whichever you're using) > Applications > Your Application and delete it.
Rebuild your app and relaunch.
I had the same problem, with the same "failed to attach to process ID 0" (I actually didn't notice that error until I saw that you said you had that error). In one of my projects the 6.0 simulator didn't work, but works in my other projects. Also my 5.1 simulator worked.
What worked for me was based off this other answer for a similar question: https://stackoverflow.com/a/12423912/159758
Go to the Product menu and find the Edit Scheme menu there.
While in Edit Scheme window, select the "Run" option on the left hand side of the screen and then on the right hand side, change the debugger from LLDB to GDB.
Run the project, this worked in the simulator.
Then Go back to the Edit Scheme and set back to LLDB.
I noticed you've tried setting the debugger to GDB and not a debugger, but thought I'd mention what helped me, since you're question helped me get to the bottom of my problem (i.e. seeing the "failed to attach to process ID 0" message).
This problem may arise due to presence of more than one info.plist file.
I also faced a similar problem, and eventually found that while adding some resource file from another project I also added its info.plist file.
Once check your Build phases> Copy Bundle Resources, whether another info.plist file exist there or not. If exists then delete it, clean the project and rebuild it.
Hope it helps.....
I ran into the same issue and somehow was able to fix it and almost immediately it went back to being broken. I can tell what broke it though.
I added a couple of folders (folder references) with files in them to the copy bundle resources section. That broke it. If I recall right, I had removed both of those and was messing around with DeploymentTarget. I might have reset the simulator earlier. Regardless, it started working. So,
there is hope for a fix
this thing is caused by folder resources that need to be copied into the bundle
Updated:
I was able to get it working again. Here is what I did..
- Cleared out the derived data folder
- Shut down the simulator app
- Also cleared the deployment in the simulator folders (Users/XXXXXX/Library/Application Support/iPhone simulator/6.1/Applications)
Since last time adding the folders to the bundle caused it to lock up, I tried it step by step adding one folder to the bundle and trying. Turns out one of my folders was named Resources and it dawned on me that particular name could potentially be colliding with something else the app looks for. So I renamed that folder to Res and tried it. It works now.
So there you have it.. Follow the steps above to get out of the problem.
Avoid copying folders called Resources to your bundle.
The Problem:
Until recently, I could build and test my app like normal. Now, Xcode is driving me crazy, I can't even run my app.
-
What Happens:
Building my app seems to launch it in the simulator, but it does not run and an EXC_ARITHMETIC error occurs (it stops at a line of code that was working fine before, no code changes since).
Looking at the 'products' folder, I can see that "appName.app" is red - i.e. the app file is never generated. A spotlight search and checking in the build folder confirms this.
Cleaning, restarting, etc does nothing to help. Other projects still build fine.
-
When it happened:
One of the graphic files I altered wouldn't update itself in the app, even after a 'clean'. So I deleted the build folder, as I've done many times before. Now I get the result explained above.
-
Any ideas or solutions are much appreciated!!! I can't develop as is... and have already wasted a lot of time as is. I'm more than happy to give a bounty if someone finds a good way to fix this, it's driving me crazy!
I had a similar problem too when my app always crashed at launching, sometimes it helps to delete the App from the Simulator. Simply hold the mouse on the app for some seconds, click on the X, close the simulator, rebuild and run.
Solution was to comment out the block of code that the error occurs in. Build, and then it runs fine.
Then, uncomment the same block. Build, and works fine.
Weird... compiler or maybe Xcode bug?? Feel free to try explain...