Xamarin with CocosSharp Clear cache between stages

Junior_OliveiraJunior_Oliveira USMember ✭✭

Good morning,

I load the images in the cache like this:

In App:

public CCGameView gameView;

Use this way:

App.Current.gameView = sender as CCGameView;

App.Current.gameView.DesignResolution = new CCSizeI(App.SceneWidth, App.SceneHeight);
App.Current.gameView.ResolutionPolicy = CCViewResolutionPolicy.FixedWidth;
App.Current.gameView.ContentManager.SearchPaths = new List<string>() { "Fonts", "Sounds", "Images"}
App.Current.gameView.TextureCache.AddImage("Image1");
App.Current.gameView.TextureCache.AddImage("Image2");
App.Current.gameView.TextureCache.AddImage("Image3");

    gameScene = new GameScene(this, App.Current.gameView);
    App.Current.gameView.RunWithScene(gameScene);

To unload the images I tried some features, without result:

App.Current.gameView.TextureCache.Dispose();
App.Current.gameView.TextureCache.UnloadContent();

Can you help me please I to see where I am wrong,
and sorry my English.

Sign In or Register to comment.