Build the game and things are missing...

Hey guys. Finally ready to build my game. So I did and found out some lights are missing, colliders, and a texture is gone in the build.

No objects are tagged “Editor only”. I’ve noticed it seems to be point lights gone missing. All scripts don’t even mention setting active any colliders/lights.

When I’m in the editor and previewing the build, everything is fine. It’s just on the final build.

Any ideas? Sorry if it’s been asked a billion times.

Any error messages on the player.log?

Are you building for windows?
Using same quality settings in editor and build?

Some thoughts:
Missing textures: make sure the assets you are using aren’t in a folder called “Editor”.
Missing lights: some known bugs with occlusion culling can cause point light to “turn off”.
Colliders: ensure the mesh is marked “Read/Write enabled” in the import settings if using mesh colliders

You know that there are some build targets that don’t support point lights, right?

Thanks for the all the answers, it’s good info. I managed to fix them. The point lights, I turned the rendering to important. The textures, I changed to a legacy type. The colliders, I re-applied those.

I’ll look into this advice anyway, for future reference as I’m very interested in continuing with unity.

PLease help me Unity system when ever i make my game and Accident / suddenly light is gone or computer turned off so my whole all project is gone even a Direction light is also gone PLease help mee its happened 2 times i lose my whole international project please solve this issue :frowning: I am using Computer and Unity 2021.3.4f1 :frowning:

Lost progress / project / work / stuff disappeared in Unity.

This article is to help you when you have lost significant progress or work in your Unity project.

It is designed to give you avenues of discovery and investigation.

It is NOT a guarantee of restoring your lost work.

To decide which parts are applicable to you, look for major headings.

EVERYTHING IS GONE, YOU CANNOT OPEN THE PROJECT

There isn’t much to do except look for files that you know existed in the project before it went away.

One common file to all Unity projects is named ProjectSettings.asset

A typical Unity project will have at a minimum the following folders:

ProjectSettings\
Packages\```

Some possible causes of the entire project disappearing are:

- you moved the project (or parent folder) somewhere else

- you inadvertently deleted it (or a parent folder)

- the project was never in the place you are currently looking and was somewhere else

- your virus / malware solution has quarantined the entire project. This can happen because Unity produces executable code, and some overly-aggressive malware solutions will flag that as suspicious.

**EVERYTHING IS PRESENT BUT MY SCENE IS BLANK**

Close Unity and make a full project backup RIGHT NOW. Do not do ANYTHING else until you back it up 100%. Ideally copy that backup to another computer, or back it up into the cloud.

If you can see all the files and folders of your project, make sure you are opening the scene file you were working in.

Once you have opened the scene, look in the hierarchy window, select an object and move the mouse over the Scene window and press F to focus that object.

Additional notes:

- ALWAYS use proper industrial grade source control (see below)
- NEVER use Dropbox or any file sync mechanism in Unity.
- NEVER move files within your project, except by doing it within Unity

I'm sorry you've had this issue. Please consider using proper industrial-grade enterprise-qualified source control in order to guard and protect your hard-earned work.

Personally I use git (completely outside of Unity) because it is free and there are tons of tutorials out there to help you set it up as well as free places to host your repo (BitBucket, Github, Gitlab, etc.).

You can also push git repositories to other drives: thumb drives, USB drives, network drives, etc., effectively putting a complete copy of the repository there.

As far as configuring Unity to play nice with git, keep this in mind:

https://forum.unity.com/threads/prefab-links-keep-getting-dumped-on-git-pull.646600/#post-7142306

Here's how I use git in one of my games, Jetpack Kurt:

https://forum.unity.com/threads/2-steps-backwards.965048/#post-6282497

Using fine-grained source control as you work to refine your engineering:

https://forum.unity.com/threads/when-to-make-a-separate-object-or-class-script-help-me-think-like-a-programmer-example-in-text.1048739/#post-6783740

Share/Sharing source code between projects:

https://forum.unity.com/threads/your-techniques-to-share-code-between-projects.575959/#post-3835837

Setting up an appropriate .gitignore file for Unity3D:

https://forum.unity.com/threads/removing-il2cpp_cache-from-project.1084607/#post-6997067

Generally setting Unity up (includes above .gitignore concepts):

https://thoughtbot.com/blog/how-to-git-with-unity

It is only simple economics that you must expend as much effort into backing it up as you feel the work is worth in the first place. Digital storage is so unbelievably cheap today that you can buy gigabytes of flash drive storage for about the price of a cup of coffee. It's simply ridiculous not to back up.

"Use source control or you will be really sad sooner or later." - StarManta on the Unity3D forum boards