Beispiel #1
0
	protected virtual IEnumerator LoadOneBundle_Delegate (string assetBundleName )
	{
#if ENABLE_NDINFRA_EXAMPLE_LOG		
		// This is simply to get the elapsed time for this phase of AssetLoading.
		float start = Time.realtimeSinceStartup;
#endif
		// Load asset from assetBundle.
		var request = AssetBundleManager.LoadBundleAsync(assetBundleName );
		if (request == null)
		{
			onError("assetBundleName is missing." , assetBundleName ) ;
			yield break;
		}
		
		yield return StartCoroutine(request);
		
		// Get the asset.
		var bundleObject = request.GetBundle() ;

		string[] pathArray = request.GetSimulatPathArray ();

		bundleLoadHandler( assetBundleName , bundleObject , pathArray ) ;

#if ENABLE_NDINFRA_EXAMPLE_LOG
		LogFinishTime( "Finished loading bundle " , assetBundleName , start ) ;
#endif // ENABLE_NDINFRA_EXAMPLE_LOG	


	}