Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / [SOLVED] "GetManagedSpriteCount()" //Always Returns "0" ? Works In Another Project

Author
Message
JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 19th Oct 2019 21:59
Hi,

I finished the optimizations in one game.
I booted up another game to optimize using new techniques from 1st game.

I have the following problem:
"GetManagedSpriteCount()" always returns 0 ?

I tried to find the difference between the two project but can't.
How can I get "GetManagedSpriteCount()" to display number of sprites used?

Thanks!

Jesse
JeZxLee
Fallen Angel Software
Video Game Design Studio
http://www.FallenAngelSoftware.com

The author of this post has marked a post as an answer.

Go to answer

JeZxLee
7
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 19th Oct 2019 22:42
This post has been marked by the post author as the answer.
Nevermind, I found the issue:
I was using "Render2DFront( )" & "Swap ( )"
instead of "Sync()"

Thanks!

Jesse
JeZxLee
Fallen Angel Software
Video Game Design Studio
http://www.FallenAngelSoftware.com
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 19th Oct 2019 22:50 Edited at: 19th Oct 2019 22:50
You can use Render2Dfront() and swap() but you also have to call Update(0) to get the sprite count

Sync() is basically the same as Update(0), Render(), swap()

Looks like you got it sorted anyway

Login to post a reply

Server time is: 2024-04-20 07:31:09
Your offset time is: 2024-04-20 07:31:09