Button isn't appearing (Android)

Button isn't appearing (Android)

My button appears to be completely absent, or shifted in layers. I have setup a button like so (the method and header declaration isn’t relevant for this topic):

Button = MenuItemImage::create("Buttons LayerA.png", "Buttons LayerB.png", CC_CALLBACK_1(HelloWorld::Bttn, this));
	Button->setPosition(Vec2(visibleSize.width/2, visibleSize.height/2));

it appears to be present when ran as a .exe in VS, however when ran on android hardware from android studio, the button is completely absent. You see I have scaled it to ginormous size, I did this to check it didn’t be re-position itself, despite the size it isn’t at all visible. What may have occured?


If i’m not mistaken, Android Studio does not let you assign MenuItemImage compile image names with spaces.
Buttons Layer.png = invalid
ButtonsLayer.png = acceptable


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

It’s also best practice to use lower case filenames for Android assets.

And cpp-tests would have shown you this. Not a single space in a file name or variable :slight_smile: