Hello Guest

Author Topic: Do I need to use a static sprite batcher or not?  (Read 3652 times)

Afro-Ninja

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 62
    • View Profile
Do I need to use a static sprite batcher or not?
« on: May 24, 2014, 06:39:45 pm »
So I have three sprites that represent different fence pieces.
I can arrange these three pieces in different ways to create chunks of a fence system.
The problem is that these fence chunks must appear at different scales. (background and foreground)

I can simply change the gameobject's scale, and it will work fine. Though this incurs more draw calls...?

I can drop them into a static sprite batcher, but I seem to encounter a lot of weird behavior with the batcher. The global coordinates of the batcher object don't seem to match up with my other game objects, and when I try to scale the batcher it seems to pop off into another section of the screen. It also turned one of my sprites dark for some reason. From what I understand the batcher also doesn't really support order in layer correctly, so should I just stick to scaling the pieces with unity's game object? Is the performance hit going to be that rough?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Do I need to use a static sprite batcher or not?
« Reply #1 on: May 24, 2014, 10:02:40 pm »
No, just scale it using sprite.scale and you should be fine. I doubt you'll need the batcher here. You can worry about the static batcher when you really need to :)