Search Unity

LoadAssetAtPath not Loading in Game?

Discussion in 'Scripting' started by erica.sampson, Aug 31, 2009.

  1. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    Hello, I have a quick question.

    I read in a post on this forum that to create an instance of a prefab in a game I should be using "Resources.LoadAssetAtPath", however I've since learned that this class will only work in the editor and won't actually work during runtime. If this is the case, what should I be using to create the instance?
     
  2. MatthewW

    MatthewW

    Joined:
    Nov 30, 2006
    Posts:
    1,356
    Look up Instantiate() -- there are very few reasons to use Resources.* functions...
     
  3. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    Thanks for the quick reply :D. I'll have a look at that right now.