示例#1
0
 public static void ForceReimport(params SubScene[] scenes)
 {
     bool needRefresh = false;
     foreach (var world in World.All)
     {
         var sceneSystem = world.GetExistingSystem<SceneSystem>();
         if (sceneSystem != null)
         {
             foreach (var scene in scenes)
                 needRefresh |= SceneWithBuildConfigurationGUIDs.Dirty(scene.SceneGUID, sceneSystem.BuildConfigurationGUID);
         }
     }
     if (needRefresh)
         AssetDatabase.Refresh();
 }