How do I get rid of the numbers in the bottom left of the screen when I am making a cocos2d game? This is probably a newb question, but still.
Asked
Active
Viewed 9,104 times
7 Answers
22
There is a ShowFPS var in one of the files when you create the initial cocos project. But this should work from anywhere:
[[Director sharedDirector] setDisplayFPS:NO];

Sup3rpanda
- 425
- 3
- 10
-
Where is it?? Your answer doesn't make sense – skippy_winks Apr 05 '11 at 22:49
-
Sorry about that, comment got cut off. – Sup3rpanda Apr 06 '11 at 00:06
-
4It's in your app delegate class. in didFinishLaunching method. – Inder Kumar Rathore Apr 06 '11 at 04:08
-
For Cocos2d v3 you can do [CCDirector sharedDirector].displayStats = NO; – Tibor Udvari Jun 25 '14 at 14:25
13
if your app delegate.. Look for
[director setDisplayFPS:YES];
change it to
[director setDisplayFPS:NO];
or you can call this anywhere like the previous answer:
[[CCDirector sharedDirector]setDisplayFPS:NO];

xuanweng
- 1,939
- 1
- 11
- 10
11
Just a heads up for people checking this out at a later date (like me). setDisplayFPS
is deprecated now. Use setDisplayStats
instead.
[[CCDirector sharedDirector] setDisplayStats:NO];

Pablo Maurin
- 1,462
- 1
- 22
- 33

Nathaniel Rogers
- 249
- 4
- 10
3
To show it only when compiling for debug:
#if defined (DEBUG)
[[CCDirector sharedDirector] setDisplayFPS:NO];
#endif

Danyal Aytekin
- 4,106
- 3
- 36
- 44
2
in AppDelegate.cpp file, and the applicationDidFinishLaunching method
// turn on display FPS
pDirector->setDisplayStats(true);
change true to false

lightboat
- 23
- 4
1
for cocos2D 3.0
[[CCDirector sharedDirector] setDisplayStats:YES];

Maxime Lorant
- 34,607
- 19
- 87
- 97

Dmitry Korchagin
- 11
- 1
1
In appdelegate.m after didfinishlaunchingoptions.
[startUpOptions setObject:@(NO) forKey:CCSetupShowDebugStats];
setObject:@NO (It is YES by default).

Apil
- 11
- 1