Currently, the main project has the Addressables sub-asset system registered, and it downloads assets from a web server. However, I would like to separate the development teams for the main system and the asset system, so I am considering splitting the projects.
Current Process:
Addressables.LoadAssetAsync<GameObject>(assetName).Completed += (handle) => OnPrefabLoaded(handle);
private void OnPrefabLoaded(AsyncOperationHandle<GameObject> handle)
{
if (handle.Status == AsyncOperationStatus.Succeeded)
{
DownloadDependencies(handle.Result);
Scene activeScene = SceneManager.GetActiveScene();
GameObject clonedModel = Instantiate(handle.Result);
}
}
private void DownloadDependencies(GameObject prefab)
{
string assetKey = prefab.name;
Addressables.DownloadDependenciesAsync(assetKey).Completed += (dependencyHandle) =>
{
if (dependencyHandle.Status == AsyncOperationStatus.Succeeded)
{
Debug.Log("Dependencies downloaded successfully for: " + assetKey);
}
else
{
Debug.LogError("Failed to download dependencies for: " + assetKey);
}
};
}
After creating the AAS (Addressables Asset System) in ProjectB, I uploaded it to the web server. However, when I run the above process in ProjectA, I am unable to download the assets. I have already made sure that the catalog file and other settings are correct. Is there a special method required to make this work? Please provide advice on how to resolve this issue.