How can this be done as a game screenshot? intresting
Well there are generally two solutions to this.
The most common one is to use a second “mirror” object that is exactly Screen.width apart from your “original”. Depending on where your originally is you either have to offset the mirror object Screen.width to the left or right. If your original is to the right of the screen center you need the mirror on the left. If your original is on the left side the mirror would be on the right side. Of course if you want that bird to always fly and wrap around once the original leaves the left side you would teleport it Screen.width to the right so it take place of the mirror and the mirror would take place of the original.
Another solution might be to use a second camera and only one bird. The view second camera needs to be touching the view of the main camera (edge to edge). That second camera would only draw things that should wrap around, so you put them on a seperate layer and let the second camera only render that layer. For example assuming the bird is the object on the left side. So the bird we see on the left side is drawn be the main camera. The second camera is to the left of the main camera. So it only sees the front part of the bird on it’s right edge. Since we just draw the second camera on top of the screen we see the front part on the right side.
Both methods have some advantages and some disadvantages. With a second camera you might get in trouble with depth sorting since the second camera is drawn after the main camera the mirror bird is always on top. It also requires and additional drawcall. That’s also true for the second bird object. However you could create one combined bird object that has a copy on the left and right Screen.width apart. So even we trippled the vertices for the object, the performance would be better and you don’t have any issues with depth or have to worry about where to place the mirror. Just wrap the center bird to the other side when it leaves the screen.
The only thing you have to keep in mind is that if you want to have interactions with the “bird” is that you now have 3 (or 2) of them. Though this depends more on the game mechanics you have in mind.