As documentation says IEnumerator
methods are executed like thread, but I'm confused why
AssetBundleCreateRequest assetBundleCreateRequest = AssetBundle.CreateFromMemory(ByteArray);
yield return assetBundleCreateRequest;
freezes my game for 2 seconds. Can anybody explain?
Well it freezes for 2 seconds because that is what you are actually requesting with your yield return assetBundleCreateRequest
So right now you are requesting your coroutine to wait till your assetbundlecreaterequest is done.
For manually checking wheter the function is done, without having to freeze your application would be using the isdone or progress command instead
If you need further clarification feel free to comment.
Edit
Sample of using isdone