private void NavigationDrawerBtnHandler(object sender, Args.TypedEventArgs <Enums.NavigationDrawerButton> args) { if (args == null) { Debug.LogWarning("MainSceneController.NavigationDrawerBtnHandler: Unable to handle click - null arguments"); return; } if (args.Error != null) { Debug.LogWarning($"MainSceneController.NavigationDrawerBtnHandler: Error - {args.Error.Message}"); return; } if (args.Cancelled) { Debug.LogWarning("MainSceneController.NavigationDrawerBtnHandler: Async operation canceled"); return; } switch (args.Data) { case Enums.NavigationDrawerButton.AllModels: { PopUp.Create(_view.Ui.transform, AppConstants.Strings.ErrorTxt, AppConstants.Strings.SectionIsUnderDevelopmentTxt); break; } case Enums.NavigationDrawerButton.MyModels: { SceneManager.LoadScene(AppConstants.SceneNames.ModelsSceneName, LoadSceneMode.Additive); break; } case Enums.NavigationDrawerButton.MyClasses: { PopUp.Create(_view.Ui.transform, AppConstants.Strings.ErrorTxt, AppConstants.Strings.SectionIsUnderDevelopmentTxt); break; } case Enums.NavigationDrawerButton.Settings: { SceneManager.LoadScene(AppConstants.SceneNames.SettingsSceneName, LoadSceneMode.Additive); break; } case Enums.NavigationDrawerButton.About: { SceneManager.LoadScene(AppConstants.SceneNames.AboutSceneName, LoadSceneMode.Additive); break; } } }
private void OnNewModelSelected(object sender, Args.TypedEventArgs <Models.AssetModel> e) { var model = Resources.Load <GameObject>(e.Data.ModelPath); if (null != model) { _placer.placedPrefab = model; } else { Debug.LogWarning("Null asset model"); } }