Manabender
Manabender

Reputation: 31

Standalone executable builds successfully, but the executable does (almost) nothing when run

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?

Upvotes: 0

Views: 188

Answers (1)

Manabender
Manabender

Reputation: 31

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.

Upvotes: 0

Related Questions