Search Unity

Load Texture2d asset after fully uploaded

Discussion in 'Scripting' started by kenmarold, Jun 16, 2017.

  1. kenmarold

    kenmarold

    Joined:
    Jun 11, 2015
    Posts:
    27
    I'm developing a game system that consists of 4 mini-computer/touchscreens networked to a main server that drives 6 projectors. On the mini-computers a user interacts with a coloring book type appllication that generates a texture2d and a json file that gets saved and sent to the main server. The main server then looks for these files and then consumes them into the main application running on the server that then gets presented to the viewers via projection.

    My question is this. How do I assure that the files getting uploaded to the main server and pulled in to the main application is fully uploaded? I assume if the main app tries to pull in a partially uploaded file it will cause some major problems. My first instinct is to write a method to compare the byte count between the full file size and what has actually been written and when they match then the main app pulls in the file? What would be the best practice for doing something like this?

    Thanks!