-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* EGS authentication is now supported * ModioCreateModLibrary members are now public * New "Getting Started" screen added with links to Discord, documentation and more * NativeSDK updated
- Loading branch information
1 parent
86dfc83
commit 0695a86
Showing
45 changed files
with
620 additions
and
56 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright (C) 2021 mod.io Pty Ltd. <https://mod.io> | ||
* | ||
* This file is part of the mod.io UE4 Plugin. | ||
* | ||
* Distributed under the MIT License. (See accompanying file LICENSE or | ||
* view online at <https://github.com/modio/modio-ue4/blob/main/LICENSE>) | ||
* | ||
*/ | ||
|
||
using UnrealBuildTool; | ||
using System.IO; | ||
|
||
public class ModioEditor : ModuleRules | ||
{ | ||
public ModioEditor(ReadOnlyTargetRules Target) : base(Target) | ||
{ | ||
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; | ||
|
||
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "UnrealEd", "Blutility", "LevelEditor", "UMGEditor", "UMG", "MainFrame"}); | ||
|
||
PublicIncludePaths.AddRange(new string[] { Path.Combine(ModuleDirectory, "Public") }); | ||
PrivateIncludePaths.AddRange(new string[] { Path.Combine(ModuleDirectory, "Private") }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#include "ModioEditor.h" | ||
#include "ModioEditorSettings.h" | ||
|
||
#if WITH_EDITOR | ||
#include "ISettingsModule.h" | ||
#include "Modules/ModuleManager.h" | ||
#include "EditorUtilityWidgetBlueprint.h" | ||
#include "Editor.h" | ||
#include "Interfaces/IMainFrameModule.h" | ||
#include "EditorUtilitySubsystem.h" | ||
#endif | ||
|
||
DEFINE_LOG_CATEGORY(ModioEditor); | ||
|
||
#define LOCTEXT_NAMESPACE "FModioEditor" | ||
|
||
void FModioEditor::StartupModule() | ||
{ | ||
#if WITH_EDITOR | ||
if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings")) | ||
{ | ||
SettingsModule->RegisterSettings( | ||
"Project", "Plugins", "mod.io Editor", LOCTEXT("EditorSettingsName", "mod.io Editor"), | ||
LOCTEXT("EditorSettingsDescription", "Configure the mod.io plugin's editor-specific behaviour"), | ||
GetMutableDefault<UModioEditorSettings>()); | ||
} | ||
if (GetMutableDefault<UModioEditorSettings>()->bShowGettingStartedOnStartup) | ||
{ | ||
IMainFrameModule& MainFrameModule = IMainFrameModule::Get(); | ||
if (MainFrameModule.IsWindowInitialized()) | ||
{ | ||
DisplayGettingStarted(); | ||
} | ||
else | ||
{ | ||
MainFrameModule.OnMainFrameCreationFinished().AddStatic(&FModioEditor::DisplayGettingStarted_PostMainFrame); | ||
} | ||
} | ||
#endif | ||
} | ||
|
||
void FModioEditor::ShutdownModule() | ||
{ | ||
#if WITH_EDITOR | ||
if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr<ISettingsModule>("Settings")) | ||
{ | ||
SettingsModule->UnregisterSettings("Project", "Plugins", "mod.io Editor"); | ||
} | ||
#endif // WITH_EDITOR | ||
} | ||
|
||
void FModioEditor::DisplayGettingStarted_PostMainFrame(TSharedPtr<SWindow>, bool) | ||
{ | ||
DisplayGettingStarted(); | ||
} | ||
|
||
void FModioEditor::DisplayGettingStarted() | ||
{ | ||
#if WITH_EDITOR | ||
|
||
UEditorUtilityWidgetBlueprint* Blueprint = | ||
GetMutableDefault<UModioEditorSettings>()->GettingStartedWidget.LoadSynchronous(); | ||
|
||
if (Blueprint) | ||
{ | ||
if (UEditorUtilitySubsystem* Subsystem = GEditor->GetEditorSubsystem<UEditorUtilitySubsystem>()) | ||
{ | ||
Subsystem->SpawnAndRegisterTab(Blueprint); | ||
} | ||
} | ||
#endif | ||
} | ||
|
||
#undef LOCTEXT_NAMESPACE | ||
|
||
IMPLEMENT_MODULE(FModioEditor, ModioEditor) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright (C) 2021 mod.io Pty Ltd. <https://mod.io> | ||
* | ||
* This file is part of the mod.io UE4 Plugin. | ||
* | ||
* Distributed under the MIT License. (See accompanying file LICENSE or | ||
* view online at <https://github.com/modio/modio-ue4/blob/main/LICENSE>) | ||
* | ||
*/ | ||
|
||
#include "ModioEditorSettings.h" | ||
|
||
UModioEditorSettings::UModioEditorSettings(const FObjectInitializer& Initializer) : Super(Initializer) | ||
{ | ||
GettingStartedWidget = TSoftObjectPtr<UEditorUtilityWidgetBlueprint>( | ||
FSoftObjectPath("/Modio/GettingStarted/OnboardingGuideWidget.OnboardingGuideWidget")); | ||
} |
50 changes: 50 additions & 0 deletions
50
Source/ModioEditor/Private/ModioEditorUtilityFunctions.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Fill out your copyright notice in the Description page of Project Settings. | ||
|
||
#include "ModioEditorUtilityFunctions.h" | ||
#include "AssetRegistry/AssetRegistryModule.h" | ||
#include "CoreGlobals.h" | ||
#include "Editor.h" | ||
#include "Modules/ModuleManager.h" | ||
#include "Templates/UnrealTemplate.h" | ||
#include "ModioEditorSettings.h" | ||
#include "LevelEditor.h" | ||
|
||
void UModioEditorUtilityFunctions::SelectAssetsInContentBrowser(const TArray<FString>& AssetPaths) | ||
{ | ||
TGuardValue<bool> UnattendedScriptGuard(GIsRunningUnattendedScript, true); | ||
|
||
if (GEditor) | ||
{ | ||
TArray<FAssetData> Assets; | ||
for (const FString& AssetPath : AssetPaths) | ||
{ | ||
FString FailureReason; | ||
FAssetRegistryModule& AssetRegistryModule = | ||
FModuleManager::LoadModuleChecked<FAssetRegistryModule>("AssetRegistry"); | ||
FAssetData Asset = AssetRegistryModule.Get().GetAssetByObjectPath(*AssetPath); | ||
if (Asset.IsValid()) | ||
{ | ||
Assets.Add(Asset); | ||
} | ||
} | ||
if (Assets.Num() > 0) | ||
{ | ||
GEditor->SyncBrowserToObjects(Assets); | ||
} | ||
} | ||
} | ||
|
||
void UModioEditorUtilityFunctions::SetDisplayGettingStartedWidgetOnStartup(bool bNewValue) | ||
{ | ||
if (UModioEditorSettings* EditorSettings = GetMutableDefault<UModioEditorSettings>()) | ||
{ | ||
EditorSettings->bShowGettingStartedOnStartup = bNewValue; | ||
EditorSettings->SaveConfig(); | ||
} | ||
} | ||
|
||
void UModioEditorUtilityFunctions::OpenTutorialBrowser() | ||
{ | ||
FLevelEditorModule& LevelEditorModule = FModuleManager::GetModuleChecked<FLevelEditorModule>(TEXT("LevelEditor")); | ||
LevelEditorModule.GetLevelEditorTabManager()->TryInvokeTab(FTabId("TutorialsBrowser")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma once | ||
#include "Widgets/SWindow.h" | ||
#include "Templates/SharedPointer.h" | ||
|
||
#include "Modules/ModuleManager.h" | ||
|
||
DECLARE_LOG_CATEGORY_EXTERN(ModioEditor, All, All); | ||
|
||
class FModioEditor : public IModuleInterface | ||
{ | ||
public: | ||
|
||
/* Called when the module is loaded */ | ||
virtual void StartupModule() override; | ||
|
||
/* Called when the module is unloaded */ | ||
virtual void ShutdownModule() override; | ||
static void DisplayGettingStarted_PostMainFrame(TSharedPtr<SWindow>, bool); | ||
|
||
static void DisplayGettingStarted(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright (C) 2021 mod.io Pty Ltd. <https://mod.io> | ||
* | ||
* This file is part of the mod.io UE4 Plugin. | ||
* | ||
* Distributed under the MIT License. (See accompanying file LICENSE or | ||
* view online at <https://github.com/modio/modio-ue4/blob/main/LICENSE>) | ||
* | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "ModioEditorSettings.generated.h" | ||
|
||
UCLASS(Config = Editor, defaultconfig) | ||
class UModioEditorSettings : public UObject | ||
{ | ||
GENERATED_BODY() | ||
public: | ||
UModioEditorSettings(const FObjectInitializer& Initializer); | ||
|
||
UPROPERTY(BlueprintReadOnly, EditAnywhere, Config, Category = "modio Editor") | ||
bool bShowGettingStartedOnStartup = true; | ||
|
||
UPROPERTY(BlueprintReadOnly, EditAnywhere, Config, Category = "modio Editor") | ||
TSoftObjectPtr<class UEditorUtilityWidgetBlueprint> GettingStartedWidget; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Fill out your copyright notice in the Description page of Project Settings. | ||
|
||
#pragma once | ||
|
||
#include "CoreMinimal.h" | ||
#include "EditorUtilityLibrary.h" | ||
#include "ModioEditorUtilityFunctions.generated.h" | ||
|
||
/** | ||
* | ||
*/ | ||
UCLASS() | ||
class MODIOEDITOR_API UModioEditorUtilityFunctions : public UEditorUtilityLibrary | ||
{ | ||
GENERATED_BODY() | ||
|
||
UFUNCTION(BlueprintCallable, Category = "Modio|EditorUtilities") | ||
static void SelectAssetsInContentBrowser(const TArray<FString>& AssetPaths); | ||
|
||
UFUNCTION(BlueprintCallable, Category = "Modio|EditorUtilities") | ||
static void SetDisplayGettingStartedWidgetOnStartup(bool bNewValue); | ||
|
||
UFUNCTION(BlueprintCallable, Category = "Modio|EditorUtilities") | ||
static void OpenTutorialBrowser(); | ||
}; |
Submodule NativeSDK
updated
61 files
Oops, something went wrong.