OnDemandResourcesRequest
                
                
                UnityEngine.iOS 中的类
                /
                继承自:AsyncOperation
                /
                实现于:UnityEngine.CoreModule
                
                
                
                
                  建议修改
                  
                    
                    
                      成功!
                      感谢您帮助我们提高 Unity 文档的质量。虽然我们无法接受所有提交,但我们确实阅读了用户提出的每个建议的更改,并在适用的情况下进行更新。
                      关闭
                     
                    
                      提交失败
                      由于某些原因,您的建议更改无法提交。请<a>稍后再试</a>。感谢您抽出时间帮助我们提高 Unity 文档的质量。
                      关闭
                     
                    
                   
                 
                
                
                
                
               
              
              
              
              
        using UnityEngine;
using UnityEngine.iOS;
using System;
using System.Collections;
public static class Loader
{
    public static IEnumerator LoadAsset(string resourceName)
    {
        // Create the request
        var request = OnDemandResources.PreloadAsync(new string[] { "Asset's ODR tag" });
        // Wait until request is completed
        yield return request;
        // Check for errors
        if (request.error != null)
            throw new Exception("ODR request failed: " + request.error);
        // Get path to the resource and use it
        var path = request.GetResourcePath(resourceName);
        Debug.Log(path);
        // Call Dispose() when resource is no longer needed.
        request.Dispose();
    }
}
       
              
              
              
                继承的成员
      
      
      
      
      
      
      
      
      
      
      事件
        | completed | 操作完成后调用的事件。在创建该调用的同一帧中注册的事件处理程序将在下一帧调用,即使该操作能够同步完成也是如此。如果在操作完成后并且已经调用了 complete 事件后注册了处理程序,则将同步调用该处理程序。 |