CriWare Unreal Engine
Plug-ins for CriWare solutions.
読み取り中…
検索中…
一致する文字列を見つけられません
AtomModulationStatics.cpp ファイル
#include "Atom/Modulation/AtomModulationStatics.h"
#include "CoreGlobals.h"
#include "Engine/Engine.h"
#include "HAL/IConsoleManager.h"
#include "HAL/PlatformFileManager.h"
#include "Misc/ConfigCacheIni.h"
#include "Misc/Paths.h"
#include "Async/Async.h"
#include "CriWare.h"
#include "Atom/AtomRuntime.h"
#include "Atom/Modulation/AtomModulation.h"
#include "Atom/Modulation/AtomModulationLogs.h"
#include "Atom/Modulation/AtomModulationProfileSerializer.h"
#include "Atom/Modulation/AtomModulationSystem.h"
#include "Atom/Modulation/AtomModulationControlBus.h"
#include "Atom/Modulation/AtomModulationControlBusMix.h"
#include <UE_INLINE_GENERATED_CPP_BY_NAME(AtomModulationStatics)>

マクロ定義

#define LOCTEXT_NAMESPACE   "AtomModulationStatics"

関数

static FAutoConsoleCommand GAtomModulationLoadMixProfile (TEXT("atom.Modulation.LoadMixProfile"), TEXT("Loads modulation mix profile from the config save directory.\n" "Path - Path to Object to load\n" "Activate - (Optional) Whether or not to activate/update the mix once it is loaded (default: true)." "ProfileIndex - (Optional) Index of profile (default: 0)"), FConsoleCommandWithArgsDelegate::CreateStatic([](const TArray< FString > &Args) { if(Args.Num()< 1) { UE_LOG(LogAtomModulation, Error, TEXT("Failed to load mix profile: Object path not provided"));return;} const FString &Path=Args[0];int32 ProfileIndex=0;if(Args.Num() > 1) { ProfileIndex=FCString::Atoi(*Args[1]);} bool bActivateUpdate=true;if(Args.Num() > 2) { bActivateUpdate=FCString::ToBool(*Args[2]);} FSoftObjectPath ObjPath=Path;if(UObject *MixObj=ObjPath.TryLoad()) { if(UAtomModulationControlBusMix *Mix=Cast< UAtomModulationControlBusMix >(MixObj)) { UAtomModulationStatics::LoadMixFromProfile(Mix, Mix, bActivateUpdate, ProfileIndex);if(bActivateUpdate) { UAtomModulationStatics::UpdateMixFromObject(Mix, Mix);} return;} } UE_LOG(LogAtomModulation, Error, TEXT("Failed to load mix '%s' from profile index '%i'"), *Path, ProfileIndex);}))
static FAutoConsoleCommand GAtomModulationSaveMixProfile (TEXT("atom.Modulation.SaveMixProfile"), TEXT("Saves modulation mix profile to the config save directory.\n" "Path - Path to Object\n" "ProfileIndex - (Optional) Index of profile (defaults to 0)"), FConsoleCommandWithArgsDelegate::CreateStatic([](const TArray< FString > &Args) { if(Args.Num()< 1) { UE_LOG(LogAtomModulation, Error, TEXT("Failed to save mix profile: Path not provided"));return;} const FString &Path=Args[0];int32 ProfileIndex=0;if(Args.Num() > 1) { ProfileIndex=FCString::Atoi(*Args[1]);} FSoftObjectPath ObjPath=Path;if(UObject *MixObj=ObjPath.TryLoad()) { if(UAtomModulationControlBusMix *Mix=Cast< UAtomModulationControlBusMix >(MixObj)) { UAtomModulationStatics::SaveMixToProfile(Mix, Mix, ProfileIndex);return;} } UE_LOG(LogAtomModulation, Error, TEXT("Failed to save mix '%s' to profile index '%i'"), *Path, ProfileIndex);}))

マクロ定義詳解

◆ LOCTEXT_NAMESPACE

#define LOCTEXT_NAMESPACE   "AtomModulationStatics"

関数詳解

◆ GAtomModulationLoadMixProfile()

FAutoConsoleCommand GAtomModulationLoadMixProfile ( TEXT("atom.Modulation.LoadMixProfile") ,
TEXT("Loads modulation mix profile from the config save directory.\n" "Path - Path to Object to load\n" "Activate - (Optional) Whether or not to activate/update the mix once it is loaded (default: true)." "ProfileIndex - (Optional) Index of profile (default: 0)") ,
FConsoleCommandWithArgsDelegate::CreateStatic([](const TArray< FString > &Args) { if(Args.Num()< 1) { UE_LOG(LogAtomModulation, Error, TEXT("Failed to load mix profile: Object path not provided"));return;} const FString &Path=Args[0];int32 ProfileIndex=0;if(Args.Num() > 1) { ProfileIndex=FCString::Atoi(*Args[1]);} bool bActivateUpdate=true;if(Args.Num() > 2) { bActivateUpdate=FCString::ToBool(*Args[2]);} FSoftObjectPath ObjPath=Path;if(UObject *MixObj=ObjPath.TryLoad()) { if(UAtomModulationControlBusMix *Mix=Cast< UAtomModulationControlBusMix >(MixObj)) { UAtomModulationStatics::LoadMixFromProfile(Mix, Mix, bActivateUpdate, ProfileIndex);if(bActivateUpdate) { UAtomModulationStatics::UpdateMixFromObject(Mix, Mix);} return;} } UE_LOG(LogAtomModulation, Error, TEXT("Failed to load mix '%s' from profile index '%i'"), *Path, ProfileIndex);})  )
static

◆ GAtomModulationSaveMixProfile()

FAutoConsoleCommand GAtomModulationSaveMixProfile ( TEXT("atom.Modulation.SaveMixProfile") ,
TEXT("Saves modulation mix profile to the config save directory.\n" "Path - Path to Object\n" "ProfileIndex - (Optional) Index of profile (defaults to 0)") ,
FConsoleCommandWithArgsDelegate::CreateStatic([](const TArray< FString > &Args) { if(Args.Num()< 1) { UE_LOG(LogAtomModulation, Error, TEXT("Failed to save mix profile: Path not provided"));return;} const FString &Path=Args[0];int32 ProfileIndex=0;if(Args.Num() > 1) { ProfileIndex=FCString::Atoi(*Args[1]);} FSoftObjectPath ObjPath=Path;if(UObject *MixObj=ObjPath.TryLoad()) { if(UAtomModulationControlBusMix *Mix=Cast< UAtomModulationControlBusMix >(MixObj)) { UAtomModulationStatics::SaveMixToProfile(Mix, Mix, ProfileIndex);return;} } UE_LOG(LogAtomModulation, Error, TEXT("Failed to save mix '%s' to profile index '%i'"), *Path, ProfileIndex);})  )
static