Hello im making my first game And i Have a problem. Im spawning a prefab thats going to move but the prefab Is not visible in game at all but in scene it Is perfecly fine even collisions Is working perfectly any soulutions for this ??
Sounds like you wrote a bug… and that means… time to start debugging!
I would start by pressing pause and going digging in your scene:
- is it there?
- is it in sight of a camera?
- is something blocking the way?
- etc, etc.
By debugging you can find out exactly what your program is doing so you can fix it.
Use the above techniques to get the information you need in order to reason about what the problem is.
You can also use Debug.Log(...); statements to find out if any of your code is even running. Don’t assume it is.
Once you understand what the problem is, you may begin to reason about a solution to the problem.
Remember with Unity the code is only a tiny fraction of the problem space. Everything asset- and scene- wise must also be set up correctly to match the associated code and its assumptions.
Thank you i’ll get right into digging
Just a thought but make sure it’s not set to a layer that is culled by the camera
I Have the object set to layer 0.