Cocossharp v1.7.1 CCGameView: SetBackgroundColor, Visibility and BringToFront not working on Android

I tried to change BackgroundColor, Visibility or call BringToFront in the CCGameView in CocosSharp v1.7.1 running on Android but nothing I tried was working. The BackgroundColor bug is listed here. If I change the background color in axml the game starts but the background color overlays the gameView so nothing is visible but the game is running in the background.

So at least Visibility and BringToFront should be added as bugs. Probably other View related properties that I didn't test are also not working. Can someone tell me if this is working on iOS ?

Here is how I start the CCGameView:

      gameView = (CCGameView)FindViewById(Resource.Id.GameView);
      gameView.ViewCreated += LoadGame;
        void LoadGame(object sender, EventArgs e) 
            CCGameView gameView = sender as CCGameView;
            if (gameView != null)
        // All three of the following functions are not working
                gameView.Visibility = ViewStates.Invisible;

                gameView.DesignResolution = new CCSizeI(gameView.ViewSize.Width, gameView.ViewSize.Height);
                gameView.ResolutionPolicy = CCViewResolutionPolicy.ShowAll; 
                gameScene = new CCScene(gameView);
                gameScene.AddLayer(new MyGameLayer());


And here is the beginning of the error message when I try to set the background color in code:
08-26 11:08:07.620 W/Adreno-EGL(24046): : EGL_BAD_ACCESS
08-26 11:08:07.620 E/libEGL (24046): eglMakeCurrent:792 error 3002 (EGL_BAD_ACCESS)
08-26 11:08:07.627 D/Mono (24046): [0xba087b40] worker starting
08-26 11:08:07.644 D/Mono (24046): [0xba096360] worker starting
08-26 11:08:07.734 D/Mono (24046): DllImport attempting to load: '__Internal'.
08-26 11:08:07.734 D/Mono (24046): DllImport loaded library '(null)'.
08-26 11:08:07.734 D/Mono (24046): DllImport searching in: '__Internal' ('(null)').
08-26 11:08:07.734 D/Mono (24046): Searching for 'monodroid_get_system_property'.
08-26 11:08:07.734 D/Mono (24046): Probing 'monodroid_get_system_property'.
08-26 11:08:07.734 D/Mono (24046): Found as 'monodroid_get_system_property'.
08-26 11:08:07.735 D/Mono (24046): DllImport searching in: '__Internal' ('(null)').
08-26 11:08:07.735 D/Mono (24046): Searching for 'monodroid_free'.
08-26 11:08:07.735 D/Mono (24046): Probing 'monodroid_free'.
08-26 11:08:07.735 D/Mono (24046): Found as 'monodroid_free'.
08-26 11:08:07.821 D/Mono (24046): DllImport attempting to load: 'openal32.dll'.


Sign In or Register to comment.