2D Toolkit Forum

2D Toolkit => Support => Topic started by: aninocoders on June 03, 2013, 09:51:51 am

Title: When is the combined mesh generated?
Post by: aninocoders on June 03, 2013, 09:51:51 am
We have an overlay sprite that we fade-in/fade-out whenever we change levels. This is just a simple interpolation of the alpha color and set it unto the sprite. This overlay is implemented as a non destroyable object that persists. What happens is that somehow a combined mesh ("Combined Mesh (root:scene)") is assigned to the MeshFilter of the sprite when the next level is loaded. So whatever color assigned to it no longer changes the color of the sprite.

I don't want this happening. How do I prevent it? It happens automatically.
Title: Re: When is the combined mesh generated?
Post by: aninocoders on June 03, 2013, 10:04:08 am
Found it. I unticked "Static". This feature may be useful but I think it's better if you use a different flag for it other than the built in "Static" flag.
Title: Re: When is the combined mesh generated?
Post by: unikronsoftware on June 03, 2013, 10:33:51 am
A different flag than what? Sorry I don't think I follow - 2D Toolkit doesn't use the Unity static flag in any way.
Title: Re: When is the combined mesh generated?
Post by: aninocoders on June 04, 2013, 03:44:52 am
Somehow it stopped generating the combined mesh when static is unticked.
Title: Re: When is the combined mesh generated?
Post by: unikronsoftware on June 04, 2013, 10:45:16 am
That sounds very much like Unitys static merging. Probably a good idea not to tick static unless your sprite is truly static. If you're changing colors, its not static.