- Home /
build and run problem

Hello, I have a "build and run" problem. I am currently working on a group project for my school. We use GitHub to share the project with each other and Pun2 to do the multiplayer game we are asked to do. The problem is that when I launch my build and run and choose the resolution etc... When I launch my executable, it first displays a window with the Unity logo and the logo of our project on a black background. Until then, everything is normal. But when my game starts, the window disappears, becomes invisible and shows a piece of logo and the red cross to close the window next to it. When I run my executable in full screen it's the same thing except that for a short while, you can see a Unity error window appear, then the window closes by itself. I hope I have well detailed my problem.
I work on the multiplayer part. So not being able to build and run is very problematic for me. I can't do any tests. In addition to that I am a beginner so I am not yet very comfortable technically. I checked with one of my group mates and he has the same problem. In addition, on other projects everything works perfectly. I don't have that problem.
Thank you for your advance answers. :) I hope my English is not too bad. (I helped myself with a translator)
You need to find the log file and post it, otherwise I doupt anyone can help you.
@PizzaPie is right, this could be the result of a million different problems, there isn't enough information to really help you sorry...
Answer by Capricorne · Apr 22, 2019 at 07:34 PM
Finally by creating a copy of my project and removing parts of my code. I rapidely found the issue. It's because of a function that I created to load my settings that I am recording with PlayerPrefs. In fact, the resolution seems to be null. 
I was conviced it wasn't it because as we can see on the screenShot width and heigth have respectively 800 and 600. 
And in the documention they use the same example with the same values. So I don't understand. https://pastebin.com/VsWwuHrK That's my script I use in the settings if you have the time to check it :). But the real problem comes from LoadSettings();
Thank you for yours answers ! And I apologize for my poor english once again.
Your answer
Follow this Question
Related Questions
uploading a game to another pc 1 Answer
Resolution Size. Camera. Build & Run. Please Help. 1 Answer
Objects are leaving trace marks 1 Answer
Android build Trying to bind too many vertex attributes 4 Answers
Building my game gives issues 1 Answer