Ejemplo n.º 1
0
 public void PreloadStaFileAsync(string filePath)
 {
     // If the STA prefab has already been created we don't have to load the file again.
     if (_staPrefabs.ContainsKey(filePath))
     {
         return;
     }
     // Start loading the STA asynchronously if we haven't already started.
     if (!_staPreloadTasks.TryGetValue(filePath, out Task <object> staLoadingTask))
     {
         staLoadingTask             = _asset.LoadObjectInfoAsync(filePath);
         _staPreloadTasks[filePath] = staLoadingTask;
     }
 }