private void Awake() { foreach (var mb in BeforeAwake) { mb.SendMessage("BeforeAwake", this); } if (XBoxEnableDataPlatformPlugin) { DataPlatformPlugin.InitializePlugin(0); } if (XBoxEnableStorageManager) { StorageManager.Create(); } if (XBoxEnableAchievementsManager) { AchievementsManager.Create(); } if (XBoxEnableConsoleUtilsManager) { ConsoleUtilsManager.Create(); } if (XBoxEnableUsersManager) { UsersManager.Create(); } if (XBoxEnableStatisticsManager) { StatisticsManager.Create(); } _manager = XBoxManager = new XBoxSocialManager(); XBoxManager.Start(Data, XBoxConnectedStorageContainerName, XBoxConnectedStorageBlobName, XBoxConnectedStorageBlobSize, this, XBoxEnableDebug, AchievementUpgradeStrategy ); InvokeRepeating("XboxSaveProgress", XBoxSaveProgressToConnectedStorageInSeconds, XBoxSaveProgressToConnectedStorageInSeconds); foreach (var mb in AfterAwake) { mb.SendMessage("AfterAwake", this); } }
public BlobItem CreateBlobItem(ICreateBlob postData) { int id = this.GenerateId(); BlobItem blobItem = BlobItemFactory.Create(postData, id, Storage.CreatePathFile(postData.file.FileName)); if (blobItem == null) { return(null); } string fileName = Path.GetFileName(blobItem.Path); if (!Storage.Create(fileName, postData.file).Result) { return(null); } _context.BlobItem.Add(blobItem); //set file in the "db" _context.SaveChanges(); return(blobItem); }