diff --git a/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/Basic/JoinChannelAudio/WBP_AudioWidget.uasset b/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/Basic/JoinChannelAudio/WBP_AudioWidget.uasset index 0f43b284..5811e8fc 100644 Binary files a/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/Basic/JoinChannelAudio/WBP_AudioWidget.uasset and b/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/Basic/JoinChannelAudio/WBP_AudioWidget.uasset differ diff --git a/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/HelperFunctionLibrary/BFL_SaveGameHelper.uasset b/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/HelperFunctionLibrary/BFL_SaveGameHelper.uasset index c592f3b3..8679681e 100644 Binary files a/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/HelperFunctionLibrary/BFL_SaveGameHelper.uasset and b/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/HelperFunctionLibrary/BFL_SaveGameHelper.uasset differ diff --git a/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/HelperFunctionLibrary/BFL_Utility.uasset b/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/HelperFunctionLibrary/BFL_Utility.uasset index 6f7dba65..96ab16ba 100644 Binary files a/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/HelperFunctionLibrary/BFL_Utility.uasset and b/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/HelperFunctionLibrary/BFL_Utility.uasset differ diff --git a/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/WBP_OneExampleEntry.uasset b/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/WBP_OneExampleEntry.uasset index 3219e80a..34d421d5 100644 Binary files a/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/WBP_OneExampleEntry.uasset and b/Agora-Unreal-SDK-Blueprint-Example/Content/API-Example/WBP_OneExampleEntry.uasset differ diff --git a/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExample.Target.cs b/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExample.Target.cs index e7a8e4db..a21ab0c0 100644 --- a/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExample.Target.cs +++ b/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExample.Target.cs @@ -2,6 +2,7 @@ using UnrealBuildTool; using System.Collections.Generic; +using System; public class AgoraBPExampleTarget : TargetRules { @@ -19,7 +20,7 @@ public AgoraBPExampleTarget( TargetInfo Target) : base(Target) if (Target.Platform == UnrealTargetPlatform.IOS || Target.Platform == UnrealTargetPlatform.Mac) { bOverrideBuildEnvironment = true; - + // [-Wno-unused-but-set-variable]: fix error "variable 'layerNames' set but not used" // [-Wno-gcc-compat]: gcc does not allow an attribute in this position on a function declaration // [-Wno-reorder-ctor]: fix error "field 'eventHandler' will be initialized after field 'mccUid'" @@ -33,12 +34,25 @@ public AgoraBPExampleTarget( TargetInfo Target) : base(Target) // [-Wno-single-bit-bitfield-constant-conversion]: UE_4.27/Engine/Source/Runtime/Engine/Public/MaterialShared.h:2304:30: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 // MarkedForGarbageCollection = 1; - // AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor -Wno-deprecated-builtins -Wno-bitwise-instead-of-logical -Wno-single-bit-bitfield-constant-conversion"; + + if (Target.Version.MajorVersion < 5) + { + AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor -Wno-deprecated-builtins -Wno-bitwise-instead-of-logical -Wno-single-bit-bitfield-constant-conversion"; + + Console.WriteLine("[Apply Compiler Arguments] For UE Ver < 5: AdditionalCompilerArguments: " + AdditionalCompilerArguments); + } + // error: unknown warning option '-Wno-deprecated-builtins'; did you mean '-Wno-deprecated-volatile'? [-Werror,-Wunknown-warning-option] // error: unknown warning option '-Wno-single-bit-bitfield-constant-conversion'; did you mean '-Wno-bitfield-constant-conversion'? [-Werror,-Wunknown-warning-option] - AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor"; - - } + + else + { + AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor"; + + Console.WriteLine("[Apply Compiler Arguments] For UE Ver >= 5: AdditionalCompilerArguments: " + AdditionalCompilerArguments); + } + + } } } diff --git a/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExample/BFL_UtilityTool.cpp b/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExample/BFL_UtilityTool.cpp index 838cf926..17cf3a2d 100644 --- a/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExample/BFL_UtilityTool.cpp +++ b/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExample/BFL_UtilityTool.cpp @@ -2,6 +2,8 @@ #include "BFL_UtilityTool.h" +#include "Misc/EngineVersion.h" + bool UBFL_UtilityTool::IsAgoraAudioOnlySDK() { @@ -12,3 +14,14 @@ bool UBFL_UtilityTool::IsAgoraAudioOnlySDK() #endif } + +FString UBFL_UtilityTool::GetAgoraSaveDataSlotName() +{ + + FEngineVersion EngineVersion = FEngineVersion::Current(); + FString VersionString = EngineVersion.ToString(EVersionComponent::Patch); + // UE_LOG(LogTemp, Log, TEXT("Current Engine Version: %s"), *VersionString); + + FString SlotName = "AgoraSaveData_" + VersionString; + return SlotName; +} diff --git a/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExample/BFL_UtilityTool.h b/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExample/BFL_UtilityTool.h index 08cb501a..c09febae 100644 --- a/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExample/BFL_UtilityTool.h +++ b/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExample/BFL_UtilityTool.h @@ -17,4 +17,8 @@ class AGORABPEXAMPLE_API UBFL_UtilityTool : public UBlueprintFunctionLibrary UFUNCTION(Blueprintcallable) static bool IsAgoraAudioOnlySDK(); + + + UFUNCTION(BlueprintPure) + static FString GetAgoraSaveDataSlotName(); }; diff --git a/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExampleEditor.Target.cs b/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExampleEditor.Target.cs index 813f4406..1c60261c 100644 --- a/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExampleEditor.Target.cs +++ b/Agora-Unreal-SDK-Blueprint-Example/Source/AgoraBPExampleEditor.Target.cs @@ -2,6 +2,7 @@ using UnrealBuildTool; using System.Collections.Generic; +using System; public class AgoraBPExampleEditorTarget : TargetRules { @@ -28,11 +29,25 @@ public AgoraBPExampleEditorTarget( TargetInfo Target) : base(Target) // [-Wno-single-bit-bitfield-constant-conversion]: UE_4.27/Engine/Source/Runtime/Engine/Public/MaterialShared.h:2304:30: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 // MarkedForGarbageCollection = 1; - // AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor -Wno-deprecated-builtins -Wno-bitwise-instead-of-logical -Wno-single-bit-bitfield-constant-conversion"; + + if (Target.Version.MajorVersion < 5) + { + AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor -Wno-deprecated-builtins -Wno-bitwise-instead-of-logical -Wno-single-bit-bitfield-constant-conversion"; + + Console.WriteLine("[Apply Compiler Arguments] For UE Ver < 5: AdditionalCompilerArguments: " + AdditionalCompilerArguments); + } + // error: unknown warning option '-Wno-deprecated-builtins'; did you mean '-Wno-deprecated-volatile'? [-Werror,-Wunknown-warning-option] // error: unknown warning option '-Wno-single-bit-bitfield-constant-conversion'; did you mean '-Wno-bitfield-constant-conversion'? [-Werror,-Wunknown-warning-option] - AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor"; + + else + { + AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor"; + + Console.WriteLine("[Apply Compiler Arguments] For UE Ver >= 5: AdditionalCompilerArguments: " + AdditionalCompilerArguments); + } + } diff --git a/Agora-Unreal-SDK-CPP-Example/Content/API-Example/Basic/JoinChannelAudio/BP_AudioWidget.uasset b/Agora-Unreal-SDK-CPP-Example/Content/API-Example/Basic/JoinChannelAudio/BP_AudioWidget.uasset index 2177a937..599ec31f 100644 Binary files a/Agora-Unreal-SDK-CPP-Example/Content/API-Example/Basic/JoinChannelAudio/BP_AudioWidget.uasset and b/Agora-Unreal-SDK-CPP-Example/Content/API-Example/Basic/JoinChannelAudio/BP_AudioWidget.uasset differ diff --git a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample.Target.cs b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample.Target.cs index 5a3da1fd..25a0c740 100644 --- a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample.Target.cs +++ b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample.Target.cs @@ -2,6 +2,7 @@ using UnrealBuildTool; using System.Collections.Generic; +using System; public class AgoraExampleTarget : TargetRules { @@ -32,13 +33,27 @@ public AgoraExampleTarget( TargetInfo Target) : base(Target) // [-Wno-bitwise-instead-of-logical]: UE_4.27/Engine/Source/Runtime/CoreUObject/Public/AssetRegistry/AssetDataTagMap.h:36:32: note: cast one or both operands to int to silence this warning // bool IsEmpty() const { return Class.IsNone() & Package.IsNone() & Object.IsNone(); } //-V792\n + // [-Wno-single-bit-bitfield-constant-conversion]: UE_4.27/Engine/Source/Runtime/Engine/Public/MaterialShared.h:2304:30: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 // MarkedForGarbageCollection = 1; - // AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor -Wno-deprecated-builtins -Wno-bitwise-instead-of-logical -Wno-single-bit-bitfield-constant-conversion"; + + if (Target.Version.MajorVersion < 5) + { + AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor -Wno-deprecated-builtins -Wno-bitwise-instead-of-logical -Wno-single-bit-bitfield-constant-conversion"; + + Console.WriteLine("[Apply Compiler Arguments] For UE Ver < 5: AdditionalCompilerArguments: " + AdditionalCompilerArguments); + } + // error: unknown warning option '-Wno-deprecated-builtins'; did you mean '-Wno-deprecated-volatile'? [-Werror,-Wunknown-warning-option] // error: unknown warning option '-Wno-single-bit-bitfield-constant-conversion'; did you mean '-Wno-bitfield-constant-conversion'? [-Werror,-Wunknown-warning-option] - AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor"; + + else { + AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor"; + + Console.WriteLine("[Apply Compiler Arguments] For UE Ver >= 5: AdditionalCompilerArguments: " + AdditionalCompilerArguments); + } + } } } diff --git a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/AgoraActor.cpp b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/AgoraActor.cpp index 84f55e7d..8b358834 100644 --- a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/AgoraActor.cpp +++ b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/AgoraActor.cpp @@ -3,6 +3,7 @@ #include "AgoraActor.h" #include "Engine/Engine.h" +#include "Utility/BFL_UtilityTool.h" // Sets default values AAgoraActor::AAgoraActor() @@ -23,7 +24,7 @@ void AAgoraActor::BeginPlay() } VideoWidget->AddToViewport(); - if (UAgoraConfig* LoadedGame = Cast(UGameplayStatics::LoadGameFromSlot(FString("AgoraSave"), 0))) + if (UAgoraConfig* LoadedGame = Cast(UGameplayStatics::LoadGameFromSlot(UBFL_UtilityTool::GetAgoraSaveDataSlotName(), 0))) { if (bLoadConfig) { diff --git a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Examples/Advanced/JoinChannelVideoToken/JoinChannelWithTokenWidget.cpp b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Examples/Advanced/JoinChannelVideoToken/JoinChannelWithTokenWidget.cpp index 2cffa2e8..bacc50ab 100644 --- a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Examples/Advanced/JoinChannelVideoToken/JoinChannelWithTokenWidget.cpp +++ b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Examples/Advanced/JoinChannelVideoToken/JoinChannelWithTokenWidget.cpp @@ -72,6 +72,7 @@ void UJoinChannelWithTokenWidget::ShowUserGuide() "1. You can join the channel using the token you provide.\n" "2. You can also join the channel using the token retrieved from the server.\n" "3. A simple server can be launched with the website link commented in the source code.\n" + "4. The demo won't work if the engine version is under 4.27." ""; UBFL_Logger::DisplayUserGuide(Guide, LogMsgViewPtr); diff --git a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Examples/Advanced/SpatialAudioWithMediaPlayer/SpatialAudioWithMPWidget.h b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Examples/Advanced/SpatialAudioWithMediaPlayer/SpatialAudioWithMPWidget.h index 77c74768..1cbb9a0c 100644 --- a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Examples/Advanced/SpatialAudioWithMediaPlayer/SpatialAudioWithMPWidget.h +++ b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Examples/Advanced/SpatialAudioWithMediaPlayer/SpatialAudioWithMPWidget.h @@ -221,8 +221,9 @@ class AGORAEXAMPLE_API USpatialAudioWithMPWidget : public UBaseAgoraUserWidget FString MPL_URL = "https://download.agora.io/demo/test/Agora.io-Interactions.wav"; #else - FString MPL_URL = - "https://agoracdn.s3.us-west-1.amazonaws.com/videos/Agora.io-Interactions.mp4"; + + FString MPL_URL = "https://download.agora.io/demo/test/Agora.io-Interactions.mp4"; + #endif TSharedPtr MediaPlayerSourceObserverWarpper; diff --git a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Examples/MainAgoraUserWidget.cpp b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Examples/MainAgoraUserWidget.cpp index 0c32895f..fd091fda 100644 --- a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Examples/MainAgoraUserWidget.cpp +++ b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Examples/MainAgoraUserWidget.cpp @@ -3,6 +3,8 @@ #include "MainAgoraUserWidget.h" #include "AgoraPluginInterface.h" +#include "Kismet/KismetSystemLibrary.h" +#include "../Utility//BFL_UtilityTool.h" #include "GameFramework/GameUserSettings.h" #pragma region CustomTileView @@ -61,6 +63,13 @@ void UMainAgoraUserWidget::NativeConstruct() if(Txt_SDKVer){ Txt_SDKVer->SetText(FText::FromString(AgoraUERtcEngine::GetSDKVersion())); } + +#if PLATFORM_ANDROID + // to keep screen on + // For IOS: please check IOS config ini: bEnableIdleTimer + UKismetSystemLibrary::ControlScreensaver(false); +#endif + } void UMainAgoraUserWidget::NativeDestruct() @@ -72,7 +81,7 @@ void UMainAgoraUserWidget::NativeDestruct() SaveGameInstance->Token = FString(TokenBox->GetText().ToString()); SaveGameInstance->Channelname = FString(ChannelBox->GetText().ToString()); - if (UGameplayStatics::SaveGameToSlot(SaveGameInstance, FString("AgoraSave"), 0)) + if (UGameplayStatics::SaveGameToSlot(SaveGameInstance, UBFL_UtilityTool::GetAgoraSaveDataSlotName(), 0)) { UE_LOG(LogTemp,Warning,TEXT("Save Config Succeed")); } diff --git a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Utility/BFL_HTTPHelper.cpp b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Utility/BFL_HTTPHelper.cpp index e868d54f..598a8b3b 100644 --- a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Utility/BFL_HTTPHelper.cpp +++ b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Utility/BFL_HTTPHelper.cpp @@ -6,6 +6,7 @@ void UBFL_HTTPHelper::FetchToken(FString RequestURL, int64 uid, FString ChannelName, int64 Role, std::function Callback) { +#if AG_UE427_OR_LATER // Create Json Data FString ServerData; @@ -54,10 +55,15 @@ void UBFL_HTTPHelper::FetchToken(FString RequestURL, int64 uid, FString ChannelN // Send Request Request->ProcessRequest(); + +#endif } void UBFL_HTTPHelper::HandleRequest(FHttpRequestPtr RequestPtr, FHttpResponsePtr ResponsePtr, bool bIsSuccess, std::function Callback) { + +#if AG_UE427_OR_LATER + if (!EHttpResponseCodes::IsOk(ResponsePtr->GetResponseCode())) { Callback("", false); return; @@ -81,4 +87,6 @@ void UBFL_HTTPHelper::HandleRequest(FHttpRequestPtr RequestPtr, FHttpResponsePtr } Callback("", false); + +#endif } diff --git a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Utility/BFL_UtilityTool.cpp b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Utility/BFL_UtilityTool.cpp index 3eb65642..51ca06c5 100644 --- a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Utility/BFL_UtilityTool.cpp +++ b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Utility/BFL_UtilityTool.cpp @@ -3,6 +3,7 @@ #include "BFL_UtilityTool.h" #include "MediaPlayer.h" +#include "Misc/EngineVersion.h" FString UBFL_UtilityTool::ConvertToAbsolutePath(FString InRelativePath, bool bAndroidUseInternalBasePath /*= false*/) { @@ -96,6 +97,16 @@ FString UBFL_UtilityTool::GenSimpleUIDPart_FuncCode(EUIDFuncType Type) return "00" + FString::FromInt(ValType); } +FString UBFL_UtilityTool::GetAgoraSaveDataSlotName() +{ + FEngineVersion EngineVersion = FEngineVersion::Current(); + FString VersionString = EngineVersion.ToString(EVersionComponent::Patch); + // UE_LOG(LogTemp, Log, TEXT("Current Engine Version: %s"), *VersionString); + + FString SlotName = "AgoraSaveData_" + VersionString; + return SlotName; +} + void UBFL_UtilityTool::SetCBSTextColor(UComboBoxString* CBSPtr) { // Because in UE5.2.1, the default style of ComboBoxString is the black text on the black background. diff --git a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Utility/BFL_UtilityTool.h b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Utility/BFL_UtilityTool.h index 526c333e..f9191fb6 100644 --- a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Utility/BFL_UtilityTool.h +++ b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExample/Utility/BFL_UtilityTool.h @@ -33,6 +33,9 @@ class AGORAEXAMPLE_API UBFL_UtilityTool : public UBlueprintFunctionLibrary static FString GenSimpleUIDPart_FuncCode(EUIDFuncType Type); + + static FString GetAgoraSaveDataSlotName(); + UFUNCTION(BlueprintCallable, Category = "Utility") static void SetCBSTextColor(UComboBoxString* CBSPtr); }; diff --git a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExampleEditor.Target.cs b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExampleEditor.Target.cs index 9999ed1b..b2ebbcc8 100644 --- a/Agora-Unreal-SDK-CPP-Example/Source/AgoraExampleEditor.Target.cs +++ b/Agora-Unreal-SDK-CPP-Example/Source/AgoraExampleEditor.Target.cs @@ -2,6 +2,7 @@ using UnrealBuildTool; using System.Collections.Generic; +using System; public class AgoraExampleEditorTarget : TargetRules { @@ -28,12 +29,23 @@ public AgoraExampleEditorTarget( TargetInfo Target) : base(Target) // [-Wno-single-bit-bitfield-constant-conversion]: UE_4.27/Engine/Source/Runtime/Engine/Public/MaterialShared.h:2304:30: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 // MarkedForGarbageCollection = 1; - // AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor -Wno-deprecated-builtins -Wno-bitwise-instead-of-logical -Wno-single-bit-bitfield-constant-conversion"; + + if (Target.Version.MajorVersion < 5) + { + AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor -Wno-deprecated-builtins -Wno-bitwise-instead-of-logical -Wno-single-bit-bitfield-constant-conversion"; + + Console.WriteLine("[Apply Compiler Arguments] For UE Ver < 5: AdditionalCompilerArguments: " + AdditionalCompilerArguments); + } // error: unknown warning option '-Wno-deprecated-builtins'; did you mean '-Wno-deprecated-volatile'? [-Werror,-Wunknown-warning-option] // error: unknown warning option '-Wno-single-bit-bitfield-constant-conversion'; did you mean '-Wno-bitfield-constant-conversion'? [-Werror,-Wunknown-warning-option] - AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor"; - + else + { + AdditionalCompilerArguments = "-Wno-unused-but-set-variable -Wno-gcc-compat -Wno-reorder-ctor"; + + Console.WriteLine("[Apply Compiler Arguments] For UE Ver >= 5: AdditionalCompilerArguments: " + AdditionalCompilerArguments); + } + } } } diff --git a/Agora-Unreal-SDK-CPP/AgoraPlugin/Source/AgoraPlugin/Private/AgoraPlugin.cpp b/Agora-Unreal-SDK-CPP/AgoraPlugin/Source/AgoraPlugin/Private/AgoraPlugin.cpp index 795045be..52dac324 100644 --- a/Agora-Unreal-SDK-CPP/AgoraPlugin/Source/AgoraPlugin/Private/AgoraPlugin.cpp +++ b/Agora-Unreal-SDK-CPP/AgoraPlugin/Source/AgoraPlugin/Private/AgoraPlugin.cpp @@ -12,13 +12,13 @@ DEFINE_LOG_CATEGORY(LogAgora); void FAgoraPluginModule::StartupModule() { - UE_LOG(LogAgora, Warning, TEXT("FAgoraPluginModule: %s"), *(AgoraUERtcEngine::GetSDKVersion())); + UE_LOG(LogAgora, Display, TEXT("FAgoraPluginModule - StartupModule: %s"), *(AgoraUERtcEngine::GetSDKVersion())); } void FAgoraPluginModule::ShutdownModule() { - //untested, so comment out the code for now - //AgoraUERtcEngine::Release(); + AgoraUERtcEngine::Release(); + UE_LOG(LogAgora, Display, TEXT("FAgoraPluginModule - ShutdownModule: Release RTC Engine")); } #undef LOCTEXT_NAMESPACE diff --git a/Agora-Unreal-SDK-CPP/AgoraPlugin/Source/AgoraPlugin/Public/AgoraCppPlugin/AgoraHeaderBase.h b/Agora-Unreal-SDK-CPP/AgoraPlugin/Source/AgoraPlugin/Public/AgoraCppPlugin/AgoraHeaderBase.h index 8a0ab97f..5fdd46fd 100644 --- a/Agora-Unreal-SDK-CPP/AgoraPlugin/Source/AgoraPlugin/Public/AgoraCppPlugin/AgoraHeaderBase.h +++ b/Agora-Unreal-SDK-CPP/AgoraPlugin/Source/AgoraPlugin/Public/AgoraCppPlugin/AgoraHeaderBase.h @@ -3,11 +3,12 @@ #pragma once #include "Runtime/Launch/Resources/Version.h" -#define AG_UE_5_4_OR_LATER (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 4) -#define AG_UE_5_3_OR_LATER (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 3) -#define AG_UE_5_2_OR_LATER (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 2) -#define AG_UE_5_1_OR_LATER (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) -#define AG_UE5_OR_LATER (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 0) +#define AG_UE_5_4_OR_LATER (ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 4) +#define AG_UE_5_3_OR_LATER (ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 3) +#define AG_UE_5_2_OR_LATER (ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 2) +#define AG_UE_5_1_OR_LATER (ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 1) +#define AG_UE5_OR_LATER (ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 0) +#define AG_UE427_OR_LATER (ENGINE_MAJOR_VERSION >= 4 && ENGINE_MINOR_VERSION >= 27) // For compiling the plugin independently using UAT's BuildPlugin command #if PLATFORM_WINDOWS