Example #1
0
 /// <returns>true, to avoid loading intro</returns>
 public static bool PostBootAction()
 {
     Log.Called();
     if (SteamUtilities.sman)
     {
         new GameObject().AddComponent <Camera>();
         //new GameObject("base").AddComponent<Example>();
         new GameObject("test go").AddComponent <TestComponent>();
         return(true);
     }
     else if (SteamUtilities.GetMassSub(out _))
     {
         new GameObject().AddComponent <Camera>();
         //new GameObject("base").AddComponent<Example>();
         new GameObject("mass subscribe go").AddComponent <MassSubscribe>();
         return(true);
     }
     else if (SteamUtilities.GetMassUnSub(out _))
     {
         new GameObject().AddComponent <Camera>();
         //new GameObject("base").AddComponent<Example>();
         new GameObject("mass unsubscribe go").AddComponent <MassUnSubscribe>();
         return(true);
     }
     else
     {
         return(false.LogRet(ThisMethod));
     }
 }
Example #2
0
 void OnGUI()
 {
     if (GUILayout.Button("Check Installed"))
     {
         SteamUtilities.EnsureAll();
     }
     if (GUILayout.Button("Delete UnInstalled"))
     {
         SteamUtilities.DeleteUnsubbed();
     }
 }
Example #3
0
        void Start()
        {
            try {
                LogCalled();
                SteamUtilities.GetMassUnSub(out string filePath);
                List <ulong> ids;
                bool         missing;
                if (filePath.IsNullorEmpty())
                {
                    string path = Path.Combine(DataLocation.localApplicationData, "LoadOrder");
                    ids = UGCListTransfer.GetList(path, out missing);
                    if (missing)
                    {
                        ids.AddRange(SteamUtilities.GetMissingItems().Select(item => item.AsUInt64));
                        UGCListTransfer.SendList(ids, path, false); // replace missing with actual ids.
                    }
                }
                else
                {
                    ids = UGCListTransfer.GetListFromFile(filePath, out missing);
                    if (missing)
                    {
                        ids.AddRange(SteamUtilities.GetMissingItems().Select(item => item.AsUInt64));
                        UGCListTransfer.SendList(ids, filePath, false); // replace missing with actual ids.
                    }
                }

                var subscriedItems = PlatformService.workshop.GetSubscribedItems();
                foreach (var id in ids)
                {
                    if (subscriedItems.Any(item => item.AsUInt64 == id))
                    {
                        Items.Add(new ItemT(id));
                    }
                }
                RemainingCount = Items.Count();
                StartUnSubToAll();
                StartUpdateUI();
            } catch (Exception ex) { ex.Log(); }
        }