objects dissapearing

I’m using sprite manager 1 and have a problem where all my sprites dissapear if I move the camera too far from 0 0 0. I’ve searched on the forums and found a few others with the same problem, but so far no solution that works on my game. I do have “auto update bounds” turned on and the game and sprites work great untill I try and sort the drawing order. As soon as I use stuff like SortDrawingOrder() the sprites all dissapear when the camera has moved away from 0 0 0.
Can anyone shed any light on this?

Thanks,

Richard

Too far as in TOO far? How about far clip plane on camera?

If I move the camera to the right just half a screen width, all the sprites dissapear. Sprite manager needs a object at 0 0 0, which is the bottom left of my game level. To make coding easier I set the scale to the same as my background image, which is 2048 by 1536. This means placing a object in my world at 1024, 768 is the center of the game world.

My camera is orphographic so the clipping values shouldn’t be a problem because nothing moves in the Z, it’s all on the XY plane. It’s size is set to 384 meaning the background image is at a 1 to 1 pixel size.

This only happens if I sort the drawing order of my sprites, if I don’t they do not dissapear.

Thanks,

Richard

I can’t belive no one has seen this before, especially as it’s reproducable with the example sprite manager project found in the giant sprite manager thread.

I have managed to find a solution for anyone else who runs into this. It’s a bit of a bodge for now as I don’t know C# very well and had to write a extra java script instead. If anyone could let me know how to convert this to C#, I could add it to the sprite manager script and remove a extra late update.

It seems the recalculate bounds in sprite manager 1 doesn’t work. When my camera moves too far away from 0 0 0 (where the sprite manager object is) unity stops drawing the sprites because it thinks they are off screen. I tried various ways to force this with sprite manager but nothing worked. In the end I simply made a new java script and added it to my sprite manager object to force a bounds update.

function LateUpdate ()
{

var mesh : Mesh = GetComponent(MeshFilter).mesh;
mesh.RecalculateBounds();

}

Cheers,

Richard