Search Unity

Problems loading Resources

Discussion in 'Web' started by agpardo, Apr 25, 2019.

  1. agpardo

    agpardo

    Joined:
    Jul 17, 2018
    Posts:
    4
    Hello !!

    I am developing a football game. I want that the players of the football team are randomly created from a set of prefabs (i mean, for example in one game your team has 3 different characters, and in the second match you play with other characters in your team).

    To do that, I have all the prefabs in Assets/Resource/People folder, and I load them in runtime...

    In the editor everything is fine, but when I compile the project to WebGL and try it... the game fails. The error is "Directory '/Assets/Resources/People' not found."

    How can I include the resources in the compiled version? I have copied the Assets folder (Only with the Resources/People) into the destination folder (I mean, I have the Assets folder at the same level as index.html or StreamingAssets folder), but It doesn't work.... but I do not know what else can I do...

    Thank you very much
     
  2. AlexHell

    AlexHell

    Joined:
    Oct 2, 2014
    Posts:
    167