public static void InitializeSlave()
 {
     EventService.On(nameof(DataServiceEvent.AUTO_REFRESH), (eventType, data) =>
     {
         string[] paths = ((IList)data).Cast <string>().ToArray();
         Debug.Log($"Slave need to refresh the following assets: {String.Join(", ", paths)}");
         AssetDatabase.Refresh();
         return(paths);
     });
 }
Example #2
0
 private static void InitializeSlave()
 {
     EventService.On(nameof(DataServiceEvent.AUTO_REFRESH), (eventType, data) =>
     {
         string[] paths = data.Cast <string>().ToArray();
         Debug.Log($"Slave need to refresh the following assets: {String.Join(", ", paths)}");
         AssetDatabase.Refresh();
         if (paths.Any(p => p.EndsWith(".cs")))
         {
             InternalEditorUtility.RequestScriptReload();
         }
         InternalEditorUtility.RepaintAllViews();
         return(paths);
     });
 }