I'm not getting an .exe for my game after building? - unity3d

I am new to Unity3D and have been building a zombie survival game for my university course. My issue is after building my game I am not given a .exe file.
Some of the things I have already tried:
Reinstalling Unity
Spoke to my tutor who said I had missed out on some components needed when installing Unity - UWP Build Support (.NET) & UWP Build Support (IL2CPP). Reinstalled Unity with these components, still no .exe file.
Posted this question on the Unity Community - still waiting for an answer.

Try to reinstall unity with a different version or to change machine probably there are problems with your set up

Try to build without checking the Create Visual Studio Solution checkbox

File > Build Settings… is the menu item to access the Build Settings window
It’s simply a matter of choosing the build target in the build settings dialog, and hitting the ‘Build’ button. When building standalone players, the resulting files will vary depending on the build target. For the Windows build target, an executable file (.exe) will be built, along with a Data folder which contains all the resources for your application. For the Mac build target, an app bundle will be built which contains the file needed to run the application as well as the resources.
(you may have to complete your options in player settings or probably you missed to select platform)

Related

DLL functionality stops working in UWP app after being packaged into an appx package

I'm currently having a problem where the functionality of a dll fails to work in my UWP app after packing it into an appx package and sharing it, but it works in a deployment.
Details:
The project itself is built in Unity and is meant to be used on a HoloLens 2. I'm building the Unity project with ARM architecture and it builds as a Visual Studio Solution, and I currently use Visual Studio 2019.
This is where the problem gets confusing. I can deploy the application directly to the HoloLens 2 through VS and the project works with 100% functionality and the dll has no issues. But whenever I create an appx package for the project and send it to the other user, the app will work fine only up until the dll functionality is supposed to happen. And it doesn't cause any error or crash, it just doesn't do anything.
I know dll issues can be a mystery, but I was hoping someone else may have encountered this or can see where I'm going wrong. I made sure to resign the dll's certificate with the same one used for the Unity project and check if any dependencies could be missing, but they all seem to be inherent Windows libraries (which we've installed the respective Microsoft Visual c++ redistributable to make sure that wasn't the problem).
To add some more details that may raise alarms: I compress the folder that the appx package is in to share it, the other user is using a different HoloLens 2, and I share the zip through OneDrive.
Thanks for any help!
Solved the issue! Turns out it was not a dll specific problem. The other device did not have access to read a required file which we found out by looking at the logs on his device. We were able to change the functionality of reading this file and now it works. Thanks for all the help!

unity exits when clicking the play button after adding MRTK packages

I have a problem in development of mixed reality app and there has been 2 days that I'm stuck.
My problem is that after adding packages of MRTK to the unity project, if I click the play button, the unity exits (closing) without any error massages or warning.
I tested two versions of unity (2020.3.32f1 and 2020.3.33f1) and both had the same problem.
I am using this link (MRTK document) and also this one Mixed Reality Feature Tool as a guide for configuration and adding the packages of MRTK to my project.
I have also tried two different versions of the packages i.e. (Mixed Reality Toolkit Foundation and Mixed Reality Toolkit Extensions both versions of 2.7.3 and 2.7.2 and for Mixed Reality OpenXR Plugin package I tried 1.4.0 and 1.3.1 versions).
I am using Visual Studio 2019 version 16.11.14
Inside Unity, I am choosing Universal Windows Platform from the Build Settings and I want to practice a little development of mixed reality applications, but I am stuck at the beginning and when ever I press the play button the unity exits (closed) without any warning or error.
Just for more information → I don't have Microsoft Hololens2, therefor I am considering to use Windows Mixed Reality simulator (Mixed Reality Portal).
I can't get what mistakes I am doing, please if you have any idea help me.
Thanks in advance.
There are many steps to configure a Unity Project for Mixed Reality. According to the description, it is hard to determine which step causes the issue. I have created a repository which is implemented with the necessary MR packages, and the configuration has been done. Feel free to pull the repo from https://github.com/sethdu0525/MR-Blank-Project. Please open it and click run to test.
If you still have this issue, you may need to have a clean installation of Unity 2020.3.33f1 (LTS), Visual Studio 2022 and make sure all the required components have been installed, including a comparatively new Windows SDK.
If you have a dump file for the crash, you may also share it and find support from Unity forum -- General Discussion - Unity Forum

Debug Unity IL2CPP UWP Build for HoloLens

So there are a lot of guides for this topic, like:
SO-Post
Microsoft-Doc
Dev-Blog
And I set up my project like described in those guides.
Project Settings>Player:
Scripting Backend is IL2CPP
Api Compatibility Level is .NET 4.x
The capabilities
PrivateNetworkClientServer, InternetClientServer are checked
Build Settings:
Build Conf is Release
Architecture is ARM64
Copy References, Development Build, Script Debugging, Wait For Managed Debugger are checked
VS|HoloLens:
is connected via Wifi (not usb)
after deployment and start of the application I get the notification to start debugging, which I do. I open a script, that I want to debug, in unity which leads to a new instance of VS where I go to Debug>Attach unity debugger and choose one instance of my process (I get only one process, some ppl have more than one).
Issue:
I placed some brakepoints an they get not triggered. I dont know
why.
Second question I have is - If this debugging would work, would it be possible to debug/step through code that is wrapped in a macro like #if UWP or WINMD?

Freeze on Copying APK file

I created a new empty project, switched platform to Android and started Build and Run. But when it comes to "Copying APK File to device" it just freezes and I have to restart Unity.
I installed Android SDK & NDK tools just before that (through Unity Hub). Android Build Support was installed by me manually a while ago so it was visible as installed in Add Modules window. I did not do any changes to the project. The most interesting thing is that the apk is built in my Builds folder. Not sure if it works though.
I am using Unity 2019.1.0f2. The device Android version is 9.0 (API level 28) and the minimum API set in Player is 16, so the problem should not be with API.
Does anyone know possible reasons for it?
Try to turn off the following setting on your android device.
Settings -> Developer options -> Monitor apps installed by ADB
This setting(if turned on) will ask a verrification if you want to install the app. It feels like this cuts off the connection with unity which causes it to get stuck.
Unplugging and replugging the device seems to work aswell. In case of big projects this is anoying tho since if you are to quick it will just say it lost connection and it will ask if you want to reconnect, which in turn causes the same problem.
This is the only answer that worked for me:
https://answers.unity.com/questions/1248123/build-run-apk-freezes-on-pushing-content-only-one.html
In short, Player settings -> Publishing settings -> Split application binary
First of I would ask you on what computer did you run this on? (performance wise)
Second you can just copy the .apk file to the phone and install it there. If you got to where it prompts for copying to android your apk file is fine and built.

Can't Build a PC StandAlone Unity3D

I'm new to Unity 3D Game Development and I've learned the very first game Roll a Ball by watching tutorials but in the end stuck in a problem that I am not able to Build my Project from the Build Settings PC Standalone Module, Error occurs:
No PC/MAC standalone Module loaded.
I don't understand where would be the problem, I have also attached the screenshot of my question.
As Droppy mentioned, it looks as though you are missing the Windows Build Support module.
However, you don't have to reinstall Unity, you can just run the Download Assistant and just select the Windows Build Module from there. That will install the module, without reinstalling Unity.
Close and reopen Unity, and it should work fine.
As described in the documentation, you can decide what modules to install when you install Unity. It looks like you didn't install the Windows Build Support module.
To rectify, I would recommend re-installing Unity (it's probably been patched since, anyway).