I have a Xamarin.Android project with a camera preview. I want to layer a CCGameView over the Preview using the live camera feed as the "background". I have tried setting the opacity of the CCScene to 0 and the Color of the CCLayerColor to transparent as well as setting the view's background color to transparent, but the background is still black. How do I make the background of the CCGameView Transparent?
CCGameView gameView = FindViewById<CCGameView>(Resource.Id.game_view);
CCScene gameScene = new CCScene(gameView);
gameScene.AddLayer(new MyGameLayer());
gameView.RunWithScene(gameScene);
gameView.StartGame();
MyGameLayer.cs
public GameLayer() : base(CCColor4B.Transparent) {}
protected override void AddedToScene() {
base.AddedToScene();
CCLabel label = new CCLabel("Test", "arial", 22);
label.Position = new CCPoint(100, 100);
AddChild(label);
}
The CCGameView is defined in xml layered over the camera preview in a FrameLayout.
Below is the result.