Search Unity

Include / Exclude platform dependent files

Discussion in 'Asset Bundles' started by Cris_2013, Sep 22, 2019.

  1. Cris_2013

    Cris_2013

    Joined:
    Nov 25, 2017
    Posts:
    39
    Hi forum,

    In my project I have some binary files that contain the texts for my game (separated by language), these binary files sit on the Resources folder (which to my understanding it means all files will be included in all platform builds).
    However I need to discriminate some texts based on the platform (i.e. Press A button, Press left mouse button, tap screen, etc...). I would like to avoid including all text files of all platforms in each platform (specially because some of those contain links to some icons that are only loaded on that particular platform, I.E. Xbox controller icons are not included in the iPhone build).

    So the question would be, is there any way to flag a file to be included / excluded on a particular platform build?

    I was considering to include those text files within asset bundles since my tools already build platform dependent bundles.

    Any best practices here?

    Sorry if this is not the correct forum, couldn't decide which one is the best to place this question.

    Many thanks!