Hello. When I build my game using Unity and open it, a Windows Defender alert pops up that says “Windows Defender protected your pc”. Is it possible to somehow make this alert not pop up? Thnaks.
I would google for using Windows Defender with Unity, or just generally as a developer.
I’m saying that when somebody downloads my game, they get the Defender alert. And I think if I told them “Ok, there is no viruses, Windows defender has a mistake. You can turn it off to open my game” it would be kinda suspicious.
I’d start by looking at what Windows Defender thinks your game is infected with.
Pretty sure there is something on your PC that infects new created exes. Build games with unity are normally not detected as infected.
On other hand, virus detection is checking the file against a checksum. If somehow the build file contains this checksum anywhere, its marked as infected (which it is not). Try changing anything like 64 to 32 bit compilation, then build again and check what happens. If it still fails, its not caused by unity. If it works fine, its a checksum matching somewhere in your exe which could happen (its a chance of 1:several millions but it could).
My .exe file that contains the game was built using Inno Setup Compiler. May that be the cause? I don’t think that any viruses are on my PC now, Bitdefender doesn’t see any of them, and I wasn’t downloading any suspicious files.
I built the game in x86 instead of x64_86 and compiled the game to an .exe file in Inno Setup Compiler and there is no Defender alert. So chance 1:several millions
I know I’m necroing, but any idea of how to fix the checksum thing? Should I just add a random object or class to the build :?
Maybe this helps someone:
When building on a Mac OS for Windows 64-bit I also get this problem then when trying to run the exe on Windows. When I build exactly the same project on Windows, it works ![]()