billybobsmojo Posted May 6, 2015 Share Posted May 6, 2015 Im trying to create a 9 slice style object to render shapes with repeating tiles. SpriteBatch appears to offer the fastest rendering solution but when I add a tiling sprite to a SpriteBatch it fails to repeat the texture even when the tiling sprites width/height dimensions suggest it should. Everything works fine when I instead embed it in a DisplayObjectContainer. Is it possible to have a TilingSprite inside a SpriteBatch or will I need to used a DisplayObjectContainer instead? Another possibility for me would be to manually generate and position sprites inside a SpriteBatch to achieve the same effect. An awkward solution I'd rather avoid but if there's still a performance gain over using a DisplayObjectContainer, its one I'd be forced to use... Quote Link to comment Share on other sites More sharing options...
xerver Posted May 7, 2015 Share Posted May 7, 2015 SpriteBatch is for raw sprites, nothing else. You should use a normal container, the benefit of SpriteBatch is when you have a lot of sprites. The difference between SpriteBatch and container for a single objects is nothing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.