loading 3d models in unity editor and in deployed app

I’ve created an app that make use of models that in editor I load using UnistyEditor AssetDatabase.LoadAssetAtPath. If I try to deploy it says that Unity Editor can’t be used. So which is the best strategy that I should apply to load my models at run time, outside the editor?
Thank you,
Cheers

Daniele

Hi,

Take a look at the unity docs for loading at runtime: Unity - Manual: Loading Resources at Runtime

From the above link you could use Resources.Load() to do what your looking for:

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour
{
    void Start()
    {
        // Instantiates a prefab named "enemy" located in any Resources
        // folder in your project's Assets folder.
        GameObject instance = Instantiate(Resources.Load("enemy", typeof(GameObject))) as GameObject;
    }
}