2D Toolkit Forum

2D Toolkit => Support => Topic started by: Game Whiz on April 13, 2012, 02:13:32 am

Title: Sprite material
Post by: Game Whiz on April 13, 2012, 02:13:32 am
I've created a new opaque material, based on an existing atlas, so that I can render opaque sprites in a sprite collection. When I attribute the material to the sprite in the editor everything works. As soon as I'm running my game, the material changes back to the original material.

I've traced it to the UpdateMaterial method, which I've "corrected" only to update the material if the material is null. Could you please include a flag or some other means of being able to specify that I don't want the material to be overwritten?

BR,
Alex
Title: Re: Sprite material
Post by: unikronsoftware on April 13, 2012, 10:37:24 am
I will look into this. Something to solve this problem will be in the next 1.70 beta.
Title: Re: Sprite material
Post by: Game Whiz on May 08, 2012, 09:58:16 am
Hi,

I just upgraded to 1.7 but this issue seems to remain. Is there anything I should do to disable material updates or did you miss this for this release?

BR,
Alex
Title: Re: Sprite material
Post by: Game Whiz on May 08, 2012, 10:09:40 am
Just noticed the material field in the sprites. Everything is working now :)