[Android Forms] Can not set Background Color of CocosSharpView
Prompted from forum post forum post with example code
Some of the code I'm using: CocosSharpView : gameView = new CocosSharpView() { BackgroundColor = Color.Transparent, DesignResolution = new Size(1024, 768), HorizontalOptions = LayoutOptions.Center, // Set the method to call once the view has been initialised ViewCreated = LoadGame }; GameLayer:
public GameLayer(): base(CCColor4B.Transparent) { //.. }
Did you guys get success on this...
Does it work for iOS project in Xamarin.Forms ?
I'm having the same problem with running on Android.
I set the game view's background color to transparent, it's working on iOS but on Android it's showing black background.
It seems to be not setting the color for an inside sublayer or an inside stage view in the game view.
I think so because when I apply rotateYTo(180) to the game view it only shows a black view without showing my custom drawing above it. Meaning that if the transparency issue is resolved it could show after rotation. (working on iOS already)
After some debugging from inside the custom CCScene class made for drawing graphics on a layer.
gameView.DrawingCacheBackgroundColor is a black color and probably the cause for the problem
Please advice if there is a way to change it