- Home /
Game works in editor, not in build
I created a sort of cellular automata where there is a grid of cells and at each frame, the cells are updated. For some reason, in the build, the behavior of the cells is very different from the editor version. I have no idea what could be the problem. I get no errors in the editor and it's not like the build completely doesn't work, the cells just don't behave correctly at all.
I very much doubt the problem is with my code. Is it something I can fix in the settings perhaps? I have tried searching for solutions, but I don't have anything tagged EditorOnly, and I haven't deleted any tags, so the solutions I've seen don't apply.
Edit: Some more detail. It actually seems like the game window size in the editor also affects this. When the window is minimized, things work properly, but when the game is maximized, it does the same as the build and doesn't function like it should.
Answer by BugiGames · Apr 04, 2021 at 01:47 PM
try maybe to run your game with Screen.Set Resolution(960x540, true); because games are automatically run on Unity on full hd 1920 x 1080 which is eating lot of performance
Screen.sleepTimeout = SleepTimeout.SystemSetting;
int qualityLevel = QualitySettings.GetQualityLevel();
Time.fixedDeltaTime = 0.007f;
Application.targetFrameRate = 320;
if (qualityLevel == 0)
{
QualitySettings.vSyncCount = 0;
QualitySettings.antiAliasing = 0;
res = true;
if (res)
{
Screen.SetResolution(960, 540, true);
}
}
if (qualityLevel == 1)
{
QualitySettings.vSyncCount = 0;
QualitySettings.antiAliasing = 0;
res = true;
if (res)
{
Screen.SetResolution(1024, 576, true);
}
}
if (qualityLevel == 2)
{
QualitySettings.vSyncCount = 1;
QualitySettings.antiAliasing = 2;
res = false;
}
something like this, also you need create script for saving data for quality from main menu.
Your answer
Follow this Question
Related Questions
My android app build has more bugs on it than the editor/deveploment version 0 Answers
Buggy artifacts in editor and play view? 0 Answers
cannot open a unity scene 0 Answers
Unity Builds Old Version of my Scene 1 Answer
Inspector issue about draw Button(s) on top of EditorGUI fields, and "CLICK" on it. 1 Answer