Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

- Cache failed assets by type to allow content loading fallback by type #8

Merged
merged 1 commit into from Aug 27, 2014

Conversation

doubleday
Copy link

Right now content manager prevents loading of native bm font files. This patch enables the intended fallback.

See also:

Cocos2DXNA/cocos2d-xna@c59c6fa

@doubleday
Copy link
Author

Just wanted to add the reasoning:

The problem is the factory method in CCBMFontConfiguration:

    internal static CCBMFontConfiguration FontConfigurationWithFile(string fntFile)
    {
        try
        {
            return CCContentManager.SharedContentManager.Load<CCBMFontConfiguration>(fntFile);
        }
        catch (ContentLoadException)
        {
            return new CCBMFontConfiguration(fntFile);
        }
    }

The fallback does not work because the content manger cached the load failure by fntFile string. So retrying with string doesn't work unless load failures are cached by path + type

kjpou1 added a commit that referenced this pull request Aug 27, 2014
- Cache failed assets by type to allow content loading fallback by type
@kjpou1 kjpou1 merged commit a7c07a6 into mono:master Aug 27, 2014
@kjpou1
Copy link
Contributor

kjpou1 commented Aug 27, 2014

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants