Search Unity

How to provide a local resource file for tizen

Discussion in 'Tizen' started by srirambngl, Dec 28, 2016.

  1. srirambngl

    srirambngl

    Joined:
    Oct 28, 2015
    Posts:
    13
    Hi,

    I have a specific requirement.
    In my tizen native app i have a local html file which i will place in /res folder and access it by using app_get_resource_path().
    How could i do that in a unity app. I mean where should i place the html file in unity game, so that it will get copied to /res folder of tizen package.

    regards
    Sriram.
     
  2. Masterfalcon

    Masterfalcon

    Unity Technologies

    Joined:
    Dec 29, 2014
    Posts:
    364
  3. srirambngl

    srirambngl

    Joined:
    Oct 28, 2015
    Posts:
    13
    Let me explain you my usecase clearly.
    I am working on developing a plugin for unity in tizen. And i need to access the html file provided by Unity in Tizen (infact any file added in unity app resources in tizen).

    Steps:
    1. Unity is having a image or html file added in its Assets folder
    2. The unity application will call the API exposed by my Tizen Plugin giving the file path
    3. The shared library in Tizen, should be able to use the file provided by unity

    Right now i can see that the TextAsset file added in Asset folder of unity app is not copied to any folder of tizen tpk package.
     
  4. Masterfalcon

    Masterfalcon

    Unity Technologies

    Joined:
    Dec 29, 2014
    Posts:
    364
    Does your plugin need a file or can it function with just the HTML contained in the file? TextAssets get serialized like other assets but you can ask Unity for the asset via the asset name. Then get the raw text of the asset.