I have been bashing my head against the wall on this one for some weeks now, I have a game built with Unity 2022.3.7, I recently upgraded my pv as was that time and although I find it difficult to blame that process I really don’t have any idea of why it happened, allow me to explain and show some images.
So this is what the game looks like played in Unity Editor:
And here is what the build produces:
I have a log file in player prefs but all it tells me is textures failed to upload, there is no indication to what textures or why, I can only assume the missing textures are for example missing on the building in the second image.
The things I have tried:
Deleting Library Folder - I did this but it always finishes with Unity being white and I have to force close and re-open Unity, this normally works for restarting by there is no difference in the build results.
I have tried to use Deep profilling and bundle profiller in the application but it never seems to work for me the game just tends to not start.
If anyone has experienced this or knows anything about it or how to resolve I would be greatly appreciated
Many thanks all and I hope you all have a great day.
You are aware that this is an alpha version? And an early one at that.
If you want to actually create and publish a game, stick to the LTS or tech stream releases. Beta and particularly Alpha versions are for experimentation, testing, prototyping only - and of course bug reporting if you run into issues.
Yeah, because you DO NOT LEAVE UNITY OPEN when deleting the Library folder! Sorry, but that should be self-understood. You cannot expect a program to behave nicely when you pull the rug under its feet (eg essentially deleting files the editor is currently working with).
First thing you do now is to close the project (if open), then delete your project’s Library folder, as it may contain corrupt data. Then try open it again. If the issue persists, try to reproduce it in a new project and if it also happens there, report it as a bug.
If on the other hand you actually care to make progress with your project, install Unity 2022.3 or 2023.1. Then delete the Library folder of your project. Also make a backup of your project (you don’t need to backup the Library folder). Then try to open it with these official Unity versions, fix any possible errors due to incompatible package versions or API, and then try building again.
First off, I mistakenly put 2023, I meant 2022.3.7 secondly don’t assume I left Unity open when deleting the Library folder how dare you be so rude. I am actually quite disturbed by the manner in which you addressed this post
Rereading your post, I am very disappointed in the fact you immediately think you know what I have or haven’t done or what I do or do not care about, shame really, I was hoping for actual help and not rudeness
I’m really sorry! I’ve understood this sentence “it [deleting Library] always finishes with Unity being white and I have to force close and re-open Unity” that you did so with the project still open in the editor.
Also I take things as they are, like the Unity version.
Did you check the build report? It’s in the editor.log after a build. Since you mention bundles you may want to check that you also built the necessary bundles and that they’re available and being loaded in the build. I haven’t used them much, I think you do need to actually load a bundle in code if you use assets in asset bundles - it may work in the editor because it contains the asset either way.
The “white screen/icons” issue has been reported several times. Sometimes updating graphics driver helps but if you search specifically for that you’ll find threads with more things to try but apparently not one specific solution.
Updating to patch 11 might also help, it’s a minor step but you never know.
Hi, understood, I have done all of the above, I have even tried several different versions of 2022.3 from .7 onwards, but after deleting the library, I even restart my system to make sure nothing is lingering, but the project launches fine and starts importing assets, then when I presume it finishes it and any editor windows are just white no gui.
The build report shows the usual failed shaders but they have no impact on the build as have always been there, and the build completes as it normally would do.
I feel like something is breaking the asset import but finding this specific cause is difficult, the build plays like normal to a point but half the visual elements are missing or dark and pixelated, the player prefs log just reports “Texture upload failed” and no other trace or error.
This is why I am now reaching out as I have tried every standard practice when dealing with project errors and corruptions.
Thanks, and sorry for biting this issue has been causing me many sleepless nights, and I understand that is no excuse so I apologise for how I retaliated.
Time to start debugging! Here is how you can begin your exciting new debugging adventures:
You must find a way to get the information you need in order to reason about what the problem is.
Once you understand what the problem is, you may begin to reason about a solution to the problem.
What is often happening in these cases is one of the following:
the code you think is executing is not actually executing at all
the code is executing far EARLIER or LATER than you think
the code is executing far LESS OFTEN than you think
the code is executing far MORE OFTEN than you think
the code is executing on another GameObject than you think it is
you’re getting an error or warning and you haven’t noticed it in the console window
To help gain more insight into your problem, I recommend liberally sprinkling Debug.Log() statements through your code to display information in realtime.
Doing this should help you answer these types of questions:
is this code even running? which parts are running? how often does it run? what order does it run in?
what are the names of the GameObjects or Components involved?
what are the values of the variables involved? Are they initialized? Are the values reasonable?
are you meeting ALL the requirements to receive callbacks such as triggers / colliders (review the documentation)
Knowing this information will help you reason about the behavior you are seeing.
You can also supply a second argument to Debug.Log() and when you click the message, it will highlight the object in scene, such as Debug.Log("Problem!",this);
If your problem would benefit from in-scene or in-game visualization, Debug.DrawRay() or Debug.DrawLine() can help you visualize things like rays (used in raycasting) or distances.
You can also call Debug.Break() to pause the Editor when certain interesting pieces of code run, and then study the scene manually, looking for all the parts, where they are, what scripts are on them, etc.
You can also call GameObject.CreatePrimitive() to emplace debug-marker-ish objects in the scene at runtime.
You could also just display various important quantities in UI Text elements to watch them change as you play the game.
Visit Google for how to see console output from builds. If you are running a mobile device you can also view the console output. Google for how on your particular mobile target, such as this answer for iOS: https://discussions.unity.com/t/700551 or this answer for Android: https://discussions.unity.com/t/699654
If you are working in VR, it might be useful to make your on onscreen log output, or integrate one from the asset store, so you can see what is happening as you operate your software.
Another useful approach is to temporarily strip out everything besides what is necessary to prove your issue. This can simplify and isolate compounding effects of other items in your scene or prefab.
If your problem is with OnCollision-type functions, print the name of what is passed in!
Here’s an example of putting in a laser-focused Debug.Log() and how that can save you a TON of time wallowing around speculating what might be going wrong:
This is the bare minimum of information to report:
what you want
what you tried
what you expected to happen
what actually happened, log output, variable values, and especially any errors you see
links to documentation you used to cross-check your work (CRITICAL!!!)
The purpose of YOU providing links is to make our job easier, while simultaneously showing us that you actually put effort into the process. If you haven’t put effort into finding the documentation, why should we bother putting effort into replying?
Note also that sometimes need to declare the shaders in a list of to include shaders in Unity settings, if adding in Resources does not do it.
Another thing to consider is what Quality is set for the build in Quality settings, note that the editor quality might be set differently, that is a usual reason that makes things look different, but should generally not make things dissapear.
Also what pipeline is used ? If using URP make sure also the forward renderer is set to Forward and not Deferred, this is another reason shaders may not appear, if are custom and not Deferred compatible, or not set to UniversalForwardOnly tag.
For clarification the build worked perfect, then I upgraded my pc and from that moment on the project wouldn’t build properly, so before the system upgrade the build and Unity both worked.
It looks like a shader issue tbh, since some items appear and some dont.
I would try two things, copy the building and use a new material with a URP standard shader on it and see if appears, also apply the building material on the terrain and see if dissapears. Then will for sure be the shader used for example.
Note that shaders get rebuilt in new machine, so at that point could be anything. Working on the previous could well stop if the shader is recompiled with different settings for example.
From experience this looks like shader stuff too. Usually shaders not being included into the build for whatever reason.
I would try adding these shaders to your Always Include Shaders in graphics settings. If addressables is in play, I have in the past needed to ensure that an object using a material that uses the shader was included in a scene that was being built into my addressables groups.