Ejemplo n.º 1
0
        public GameObject Load(E_ResourceType resourceType, string name)
        {
            string loadPath = string.Format("{0}/{1}.prefab", GetPath(resourceType), name);
            var    gobj     = UnityEditor.AssetDatabase.LoadAssetAtPath <GameObject>(loadPath);

            return(gobj);
        }
Ejemplo n.º 2
0
 private string GetPath(E_ResourceType resourceType)
 {
     return(ResourceHelper.paths[(int)resourceType]);
 }
Ejemplo n.º 3
0
        public ScriptableObject LoadAsset(E_ResourceType assetType, string name)
        {
            string loadPath = string.Format("{0}/{1}", GetPath(assetType), name);

            return(UnityEditor.AssetDatabase.LoadAssetAtPath <ScriptableObject>(loadPath));
        }