Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
App.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Containers/Array.h"
6#include "Containers/UnrealString.h"
7#include "CoreGlobals.h"
8#include "CoreTypes.h"
9#include "Delegates/Delegate.h"
10#include "HAL/PlatformCrt.h"
11#include "HAL/PlatformMisc.h"
12#include "HAL/PlatformProcess.h"
13#include "Misc/Build.h"
14#include "Misc/CString.h"
15#include "Misc/CommandLine.h"
16#include "Misc/CoreMisc.h"
17#include "Misc/FrameRate.h"
18#include "Misc/Guid.h"
19#include "Misc/Optional.h"
20#include "Misc/Parse.h"
21#include "Misc/QualifiedFrameTime.h"
22#include "Misc/Timecode.h"
23#include "Templates/UnrealTemplate.h"
24#include "UObject/NameTypes.h"
25
26/**
27 * Provides information about the application.
28 */
29class FApp
30{
31public:
32
33 /**
34 * Gets the name of the version control branch that this application was built from.
35 *
36 * @return The branch name.
37 */
39
40 /**
41 * Gets the application's build configuration, i.e. Debug or Shipping.
42 *
43 * @return The build configuration.
44 */
46
47 /**
48 * Gets the target type of the current application (eg. client, server, etc...)
49 *
50 * @return The build target type
51 */
53
55 /**
56 * For development configurations, sets whether the application should load DebugGame game modules.
57 *
58 * @param Whether we're running in debug game or not.
59 */
60 static void SetDebugGame(bool bIsDebugGame);
61#endif
62
63 /*
64 * Gets the unique version string for this build. This string is not assumed to have any particular format other being a unique identifier for the build.
65 *
66 * @return The build version
67 */
68 static const TCHAR* GetBuildVersion();
69
70 /**
71 * Gets the date at which this application was built.
72 *
73 * @return Build date string.
74 */
76
77 /**
78 * Gets the name of the graphics RHI currently in use.
79 *
80 * @return name of Graphics RHI
81 */
83
84 /**
85 * Sets the Graphics RHI currently in use
86 */
87 static void SetGraphicsRHI(FString RHIString);
88
89
90 /**
91 * Gets the value of ENGINE_IS_PROMOTED_BUILD.
92 */
94
95 /**
96 * Gets the identifier for the unreal engine
97 */
99
100 /**
101 * Gets the name of the current project.
102 *
103 * @return The project name.
104 */
105 FORCEINLINE static const TCHAR* GetProjectName()
106 {
108 }
109
110 /**
111 * Gets the name of the application, i.e. "UE" or "Rocket".
112 *
113 * @todo need better application name discovery. this is quite horrible and may not work on future platforms.
114 * @return Application name string.
115 */
117 {
118 FString ExecutableName = FPlatformProcess::ExecutableName();
119
120 int32 ChopIndex = ExecutableName.Find(TEXT("-"));
121
122 if (ExecutableName.FindChar(TCHAR('-'), ChopIndex))
123 {
124 return ExecutableName.Left(ChopIndex);
125 }
126
127 if (ExecutableName.FindChar(TCHAR('.'), ChopIndex))
128 {
129 return ExecutableName.Left(ChopIndex);
130 }
131
132 return ExecutableName;
133 }
134
135 /**
136 * Reports if the project name has been set
137 *
138 * @return true if the project name has been set
139 */
141 {
142 return (IsProjectNameEmpty() == false) && (FCString::Stricmp(GInternalProjectName, TEXT("None")) != 0);
143 }
144
145 /**
146 * Checks whether this application is a game.
147 *
148 * Returns true if a normal or PIE game is active (basically !GIsEdit or || GIsPlayInEditorWorld)
149 * This must NOT be accessed on threads other than the game thread!
150 * Use View->Family->EnginShowFlags.Game on the rendering thread.
151 *
152 * @return true if the application is a game, false otherwise.
153 */
154 FORCEINLINE static bool IsGame()
155 {
156#if WITH_EDITOR
157 return !GIsEditor || GIsPlayInEditorWorld || IsRunningGame();
158#else
159 return true;
160#endif
161 }
162
163 /**
164 * Reports if the project name is empty
165 *
166 * @return true if the project name is empty
167 */
169 {
170 return (GInternalProjectName[0] == 0);
171 }
172
173 /**
174 * Sets the name of the current project.
175 *
176 * @param InProjectName Name of the current project.
177 */
178 FORCEINLINE static void SetProjectName(const TCHAR* InProjectName)
179 {
180 // At the moment Strcpy is not safe as we don't check the buffer size on all platforms, so we use strncpy here.
181 FCString::Strncpy(GInternalProjectName, InProjectName, UE_ARRAY_COUNT(GInternalProjectName));
182 // And make sure the ProjectName string is null terminated.
184 }
185
186public:
187
188 /**
189 * Add the specified user to the list of authorized session users.
190 *
191 * @param UserName The name of the user to add.
192 * @see DenyUser, DenyAllUsers, IsAuthorizedUser
193 */
194 FORCEINLINE static void AuthorizeUser(const FString& UserName)
195 {
196 SessionUsers.AddUnique(UserName);
197 }
198
199 /**
200 * Removes all authorized users.
201 *
202 * @see AuthorizeUser, DenyUser, IsAuthorizedUser
203 */
205 {
206 SessionUsers.Empty();
207 }
208
209 /**
210 * Remove the specified user from the list of authorized session users.
211 *
212 * @param UserName The name of the user to remove.
213 * @see AuthorizeUser, DenyAllUsers, IsAuthorizedUser
214 */
215 FORCEINLINE static void DenyUser(const FString& UserName)
216 {
217 SessionUsers.Remove(UserName);
218 }
219
220 /**
221 * Gets the Zen store project id for the current application instance.
222 *
223 * @return Zen store project id.
224 */
226
227 /**
228 * Gets the globally unique identifier of this application instance.
229 *
230 * Every running instance of the engine has a globally unique instance identifier
231 * that can be used to identify it from anywhere on the network.
232 *
233 * @return Instance identifier, or an invalid GUID if there is no local instance.
234 * @see GetSessionId
235 */
237 {
238 static FGuid InstanceId = FGuid::NewGuid();
239 return InstanceId;
240 }
241
242 /**
243 * Gets the name of this application instance.
244 *
245 * By default, the instance name is a combination of the computer name and process ID.
246 *
247 * @return Instance name string.
248 */
250 {
251 return FString::Printf(TEXT("%s-%i"), FPlatformProcess::ComputerName(), FPlatformProcess::GetCurrentProcessId());
252 }
253
254 /**
255 * Gets the identifier of the session that this application is part of.
256 *
257 * A session is group of applications that were launched and logically belong together.
258 * For example, when starting a new session in UFE that launches a game on multiple devices,
259 * all engine instances running on those devices will have the same session identifier.
260 * Conversely, sessions that were launched separately will have different session identifiers.
261 *
262 * @return Session identifier, or an invalid GUID if there is no local instance.
263 * @see GetInstanceId
264 */
266 {
267 return SessionId;
268 }
269
270 /**
271 * Gets the name of the session that this application is part of, if any.
272 *
273 * @return Session name string.
274 */
276 {
277 return SessionName;
278 }
279
280 /**
281 * Gets the name of the user who owns the session that this application is part of, if any.
282 *
283 * If this application is part of a session that was launched from UFE, this function
284 * will return the name of the user that launched the session. If this application is
285 * not part of a session, this function will return the name of the local user account
286 * under which the application is running.
287 *
288 * @return Name of session owner.
289 */
291 {
292 return SessionOwner;
293 }
294
295 /**
296 * Initializes the application session.
297 */
298 static void InitializeSession();
299
300 /**
301 * Check whether the specified user is authorized to interact with this session.
302 *
303 * @param UserName The name of the user to check.
304 * @return true if the user is authorized, false otherwise.
305 * @see AuthorizeUser, DenyUser, DenyAllUsers
306 */
307 FORCEINLINE static bool IsAuthorizedUser(const FString& UserName)
308 {
309 return ((FPlatformProcess::UserName(false) == UserName) || (SessionOwner == UserName) || SessionUsers.Contains(UserName));
310 }
311
312 /**
313 * Checks whether this is a standalone application.
314 *
315 * An application is standalone if it has not been launched as part of a session from UFE.
316 * If an application was launched from UFE, it is part of a session and not considered standalone.
317 *
318 * @return true if this application is standalone, false otherwise.
319 */
321 {
322 return Standalone;
323 }
324
325 /**
326 * Check whether the given instance ID identifies this instance.
327 *
328 * @param InInstanceId The instance ID to check.
329 * @return true if the ID identifies this instance, false otherwise.
330 */
331 FORCEINLINE static bool IsThisInstance(const FGuid& InInstanceId)
332 {
333 return (InInstanceId == GetInstanceId());
334 };
335
336 /**
337 * Set a new session name.
338 *
339 * @param NewName The new session name.
340 * @see SetSessionOwner
341 */
342 FORCEINLINE static void SetSessionName(const FString& NewName)
343 {
344 SessionName = NewName;
345 }
346
347 /**
348 * Set a new session owner.
349 *
350 * @param NewOwner The name of the new owner.
351 * @see SetSessionName
352 */
353 FORCEINLINE static void SetSessionOwner(const FString& NewOwner)
354 {
355 SessionOwner = NewOwner;
356 }
357
358public:
359
360// MSVC 16.4 (1924) has a bug that does not properly handle the local static bool in CanEverRender. This will be fixed in 16.5. Working around by using FORCENOINLINE.
361// MSVC 16.6 (1926) fixes the problem so inlning can be enabled again from that point onwards.
362#if !UE_SERVER && defined(_MSC_VER) && _MSC_VER >= 1924 && _MSC_VER <= 1925
363#define INLINE_CANEVERRENDER FORCENOINLINE
364#else
365#define INLINE_CANEVERRENDER FORCEINLINE
366#endif
367
368 /**
369 * Checks whether this application can render anything.
370 * Certain application types never render, while for others this behavior may be controlled by switching to NullRHI.
371 * This can be used for decisions like omitting code paths that make no sense on servers or games running in headless mode (e.g. automated tests).
372 *
373 * @return true if the application can render, false otherwise.
374 */
376 {
377#if UE_SERVER
378 return false;
379#else
380 static bool bHasNullRHIOnCommandline = FParse::Param(FCommandLine::Get(), TEXT("nullrhi"));
381 return (!IsRunningCommandlet() || IsAllowCommandletRendering()) && !IsRunningDedicatedServer() && !(USE_NULL_RHI || bHasNullRHIOnCommandline);
382#endif // UE_SERVER
383 }
384
385 /**
386 * Checks whether this application can render audio.
387 * Certain application types produce sound, while for others this can be controlled via the -nosound cmdline.
388 * This can be used for decisions like omitting code paths that make no sense on servers or games running in headless mode (e.g. automated tests).
389 *
390 * @return true if the application can render audio, false otherwise.
391 */
393 {
394#if UE_SERVER
395 return false;
396#else
397 static bool bHasNoAudioOnCommandline = FParse::Param(FCommandLine::Get(), TEXT("nosound")) && !FParse::Param(FCommandLine::Get(), TEXT("enablesound"));
398 static bool bApplicationTypeDoesNotRenderAudio = FApp::IsBenchmarking() || IsRunningDedicatedServer() || (IsRunningCommandlet() && !IsAllowCommandletAudio());
399 return !bApplicationTypeDoesNotRenderAudio && !bHasNoAudioOnCommandline;
400#endif // UE_SERVER
401 }
402
403 /**
404 * Checks whether this application has been installed.
405 *
406 * Non-server desktop shipping builds are assumed to be installed.
407 *
408 * Installed applications may not write to the folder in which they exist since they are likely in a system folder (like "Program Files" in windows).
409 * Instead, they should write to the OS-specific user folder FPlatformProcess::UserDir() or application data folder FPlatformProcess::ApplicationSettingsDir()
410 * User Access Control info for windows Vista and newer: http://en.wikipedia.org/wiki/User_Account_Control
411 *
412 * To run an "installed" build without installing, use the -Installed command line parameter.
413 * To run a "non-installed" desktop shipping build, use the -NotInstalled command line parameter.
414 *
415 * @return true if the application is installed, false otherwise.
416 */
417 static bool IsInstalled();
418
419 /**
420 * Checks whether the engine components of this application have been installed.
421 *
422 * In binary Unreal Engine releases, the engine can be installed while the game is not. The game IsInstalled()
423 * setting will take precedence over this flag.
424 *
425 * To override, pass -engineinstalled or -enginenotinstalled on the command line.
426 *
427 * @return true if the engine is installed, false otherwise.
428 */
429 static bool IsEngineInstalled();
430
431 /**
432 * Checks whether this application runs unattended.
433 *
434 * Unattended applications are not monitored by anyone or are unable to receive user input.
435 * This method can be used to determine whether UI pop-ups or other dialogs should be shown.
436 *
437 * @return true if the application runs unattended, false otherwise.
438 */
439 static bool IsUnattended();
440
441 /**
442 * Checks whether the application should run multi-threaded for performance critical features.
443 *
444 * This method is used for performance based threads (like rendering, task graph).
445 * This will not disable async IO or similar threads needed to disable hitching
446 *
447 * @return true if this isn't a server, has more than one core, does not have a -onethread command line options, etc.
448 */
450
451 /**
452 * Checks whether application is in benchmark mode.
453 *
454 * @return true if application is in benchmark mode, false otherwise.
455 */
457 {
458 return bIsBenchmarking;
459 }
460
461 /**
462 * Sets application benchmarking mode.
463 *
464 * @param bVal True sets application in benchmark mode, false sets to non-benchmark mode.
465 */
466 static void SetBenchmarking(bool bVal)
467 {
468 bIsBenchmarking = bVal;
469 }
470
471 /**
472 * Gets time step in seconds if a fixed delta time is wanted.
473 *
474 * @return Time step in seconds for fixed delta time.
475 */
477 {
478 return FixedDeltaTime;
479 }
480
481 /**
482 * Sets time step in seconds if a fixed delta time is wanted.
483 *
484 * @param seconds Time step in seconds for fixed delta time.
485 */
486 static void SetFixedDeltaTime(double Seconds)
487 {
488 FixedDeltaTime = Seconds;
489 }
490
491 /**
492 * Gets whether we want to use a fixed time step or not.
493 *
494 * @return True if using fixed time step, false otherwise.
495 */
496 static bool UseFixedTimeStep()
497 {
498#if WITH_FIXED_TIME_STEP_SUPPORT
499 return bUseFixedTimeStep;
500#else
501 return false;
502#endif
503 }
504
505 /**
506 * Enables or disabled usage of fixed time step.
507 *
508 * @param whether to use fixed time step or not
509 */
510 static void SetUseFixedTimeStep(bool bVal)
511 {
512 bUseFixedTimeStep = bVal;
513 }
514
515 /**
516 * Gets current time in seconds.
517 *
518 * @return Current time in seconds.
519 */
520 FORCEINLINE static double GetCurrentTime()
521 {
522 return CurrentTime;
523 }
524
525 /**
526 * Sets current time in seconds.
527 *
528 * @param seconds - Time in seconds.
529 */
530 static void SetCurrentTime(double Seconds)
531 {
532 CurrentTime = Seconds;
533 }
534
535 /**
536 * Gets previous value of CurrentTime.
537 *
538 * @return Previous value of CurrentTime.
539 */
540 FORCEINLINE static double GetLastTime()
541 {
542 return LastTime;
543 }
544
545 /** Updates Last time to CurrentTime. */
546 static void UpdateLastTime()
547 {
549 }
550
551 /**
552 * Gets time delta in seconds.
553 *
554 * @return Time delta in seconds.
555 */
556 FORCEINLINE static double GetDeltaTime()
557 {
558 return DeltaTime;
559 }
560
561 /**
562 * Sets time delta in seconds.
563 *
564 * @param seconds Time in seconds.
565 */
566 static void SetDeltaTime(double Seconds)
567 {
568 DeltaTime = Seconds;
569 }
570
571 /**
572 * Gets idle time in seconds.
573 *
574 * @return Idle time in seconds.
575 */
576 FORCEINLINE static double GetIdleTime()
577 {
578 return IdleTime;
579 }
580
581 /**
582 * Sets idle time in seconds.
583 *
584 * @param seconds - Idle time in seconds.
585 */
586 static void SetIdleTime(double Seconds)
587 {
588 IdleTime = Seconds;
589 }
590
591 /**
592 * Gets overall game time in seconds.
593 *
594 * @return Overall game time in seconds.
595 */
596 FORCEINLINE static double GetGameTime()
597 {
598 return GameTime;
599 }
600
601 /**
602 * Sets overall game time in seconds.
603 *
604 * @param seconds - Overall game time in seconds.
605 */
606 static void SetGameTime(double Seconds)
607 {
608 GameTime = Seconds;
609 }
610
611 /**
612 * Gets idle time overshoot in seconds (the time beyond the wait time we requested for the frame). Only valid when IdleTime is > 0.
613 *
614 * @return Idle time in seconds.
615 */
617 {
618 return IdleTimeOvershoot;
619 }
620
621 /**
622 * Sets idle time overshoot in seconds (the time beyond the wait time we requested for the frame). Only valid when IdleTime is > 0.
623 *
624 * @param seconds - Idle time in seconds.
625 */
626 static void SetIdleTimeOvershoot(double Seconds)
627 {
628 IdleTimeOvershoot = Seconds;
629 }
630
631 /**
632 * Convert the current frame time into a readable timecode.
633 * If the current frame time is not set, the timecode value will be defaulted.
634 *
635 * @return the current timecode.
636 */
638
639 /**
640 * Get the frame rate of the current frame time.
641 * If the current frame time is not set, the frame rate value will be defaulted.
642 *
643 * @return the current timecode frame rate.
644 */
646
647 /**
648 * Gets a frame number generated by the engine's timecode provider.
649 * The current frame time is used to generate a timecode value.
650 * The optional will be false if no timecode provider was set or is not in a synchronized state.
651 *
652 * @return the current frame time.
653 */
655 {
656 return CurrentFrameTime;
657 }
658
659 /**
660 * Sets the current timecode, and the frame rate to which it's relative.
661 *
662 * @param InTimecode - current timecode.
663 * @param InTimecodeFrameRate - current timecode framerate.
664 */
665 UE_DEPRECATED(4.25, "Please use SetQualifiedFrameTime")
666 static void SetTimecodeAndFrameRate(FTimecode InTimecode, FFrameRate InTimecodeFrameRate)
667 {
668 CurrentFrameTime = FQualifiedFrameTime(InTimecode, InTimecodeFrameRate);
669 }
670
671 /**
672 * Sets the current frame time.
673 *
674 * @param InFrameTime - current frame time and frame rate.
675 */
677 {
678 CurrentFrameTime = InFrameTime;
679 }
680
681 /** Invalidate the current frame time. It will reset the TOptional. */
683 {
684 CurrentFrameTime.Reset();
685 }
686
687 /**
688 * Get Volume Multiplier
689 *
690 * @return Current volume multiplier
691 */
693 {
694 return VolumeMultiplier;
695 }
696
697 /**
698 * Set Volume Multiplier
699 *
700 * @param InVolumeMultiplier new volume multiplier
701 */
702 FORCEINLINE static void SetVolumeMultiplier(float InVolumeMultiplier)
703 {
704 VolumeMultiplier = InVolumeMultiplier;
705 }
706
707 /**
708 * Helper function to get UnfocusedVolumeMultiplier from config and store so it's not retrieved every frame
709 *
710 * @return Volume multiplier to use when app loses focus
711 */
713
714 /**
715 * Sets the Unfocused Volume Multiplier
716 */
717 static void SetUnfocusedVolumeMultiplier(float InVolumeMultiplier);
718
719 /**
720 * Sets if VRFocus should be used.
721 *
722 * @param bInUseVRFocus new bUseVRFocus value
723 */
724 static void SetUseVRFocus(bool bInUseVRFocus);
725
726 /**
727 * Gets if VRFocus should be used
728 */
730 {
731 return bUseVRFocus;
732 }
733 /**
734 * Sets VRFocus, which indicates that the application should continue to render
735 * Audio and Video as if it had window focus, even though it may not.
736 *
737 * @param bInVRFocus new VRFocus value
738 */
739 static void SetHasVRFocus(bool bInHasVRFocus);
740
741 /**
742 * Gets VRFocus, which indicates that the application should continue to render
743 * Audio and Video as if it had window focus, even though it may not.
744 */
746 {
747 return bHasVRFocus;
748 }
749
750 /**
751 * Sets HasFocus, which is a function that indicates that the application window has focus.
752 *
753 * @param InHasFocusFunction address of a function that can query the focus state, typically &FPlatformApplicationMisc::IsThisApplicationForeground
754 */
755 static void SetHasFocusFunction(bool (*InHasFocusFunction)());
756
757 /**
758 * Gets Focus, Indicates that the application should continue to render
759 * Audio and Video as if it had window focus, even though it may not.
760 */
761 static bool HasFocus();
762
763 /* If the random seed started with a constant or on time, can be affected by -FIXEDSEED or -BENCHMARK */
764 static bool bUseFixedSeed;
765
766 /* Print all initial startup logging */
768
769private:
770
772 /** The current build configuration */
773 static bool bIsDebugGame;
774#endif
775
776 /** Holds the session identifier. */
778
779 /** Holds the session name. */
781
782 /** Holds the name of the user that launched session. */
784
785 /** Holds the name the graphics RHI currently in use*/
787
788 /** List of authorized session users. */
790
791 /** Holds a flag indicating whether this is a standalone session. */
792 static bool Standalone;
793
794 /** Holds a flag Whether we are in benchmark mode or not. */
795 static bool bIsBenchmarking;
796
797 /** Holds a flag whether we want to use a fixed time step or not. */
798 static bool bUseFixedTimeStep;
799
800 /** Holds time step if a fixed delta time is wanted. */
801 static double FixedDeltaTime;
802
803 /** Holds current time. */
804 static double CurrentTime;
805
806 /** Holds previous value of CurrentTime. */
807 static double LastTime;
808
809 /** Holds current delta time in seconds. */
810 static double DeltaTime;
811
812 /** Holds time we spent sleeping in UpdateTimeAndHandleMaxTickRate() if our frame time was smaller than one allowed by target FPS. */
813 static double IdleTime;
814
815 /** Holds the amount of IdleTime that was LONGER than we tried to sleep. The OS can't sleep the exact amount of time, so this measures that overshoot. */
816 static double IdleTimeOvershoot;
817
818 /** Holds overall game time. */
819 static double GameTime;
820
821 /** Holds the current frame time and framerate. */
823
824 /** Holds if we should generate a drop frame timecode when the frame rate does support it. */
826
827 /** Use to affect the app volume when it loses focus */
828 static float VolumeMultiplier;
829
830 /** Read from config to define the volume when app loses focus */
832
833 /** Holds a flag indicating if VRFocus should be used */
834 static bool bUseVRFocus;
835
836 /** Holds a flag indicating if app has focus in side the VR headset */
837 static bool bHasVRFocus;
838
839 /** Holds a function address that can indicate if application has focus */
840 static bool (*HasFocusFunction)();
841};
842
843
844/** Called to determine the result of IsServerForOnlineSubsystems() */
845DECLARE_DELEGATE_RetVal_OneParam(bool, FQueryIsRunningServer, FName);
846
847
848/**
849 * @return true if there is a running game world that is a server (including listen servers), false otherwise
850 */
851bool IsServerForOnlineSubsystems(FName WorldContextHandle);
852
853/**
854 * Sets the delegate used for IsServerForOnlineSubsystems
855 */
856void SetIsServerForOnlineSubsystemsDelegate(FQueryIsRunningServer NewDelegate);
bool IsServerForOnlineSubsystems(FName WorldContextHandle)
#define INLINE_CANEVERRENDER
Definition App.h:365
void SetIsServerForOnlineSubsystemsDelegate(FQueryIsRunningServer NewDelegate)
#define USE_NULL_RHI
Definition Build.h:190
#define UE_BUILD_DEVELOPMENT
Definition Build.h:20
#define UE_SERVER
Definition Build.h:45
#define WITH_EDITOR
Definition Build.h:7
FORCEINLINE bool IsRunningCommandlet()
FORCEINLINE bool IsAllowCommandletRendering()
FORCEINLINE bool IsAllowCommandletAudio()
TCHAR GInternalProjectName[64]
FORCEINLINE bool IsRunningDedicatedServer()
Definition CoreMisc.h:145
#define UE_DEPRECATED(Version, Message)
#define DECLARE_DELEGATE_RetVal_OneParam(ReturnValueType, DelegateName, Param1Type)
EBuildConfiguration
#define TEXT(x)
Definition Platform.h:1108
#define FORCEINLINE
Definition Platform.h:644
#define UE_ARRAY_COUNT(array)
Definition App.h:30
static void SetUnfocusedVolumeMultiplier(float InVolumeMultiplier)
static bool(* HasFocusFunction)()
Definition App.h:840
static void InvalidateCurrentFrameTime()
Definition App.h:682
static FTimecode GetTimecode()
static FORCEINLINE double GetDeltaTime()
Definition App.h:556
static FORCEINLINE bool IsAuthorizedUser(const FString &UserName)
Definition App.h:307
static FORCEINLINE double GetIdleTime()
Definition App.h:576
static FORCEINLINE const TCHAR * GetProjectName()
Definition App.h:105
static void SetUseVRFocus(bool bInUseVRFocus)
static FString GraphicsRHI
Definition App.h:786
static FORCEINLINE void DenyAllUsers()
Definition App.h:204
static INLINE_CANEVERRENDER bool CanEverRenderAudio()
Definition App.h:392
static void UpdateLastTime()
Definition App.h:546
static void SetGameTime(double Seconds)
Definition App.h:606
static double GameTime
Definition App.h:819
static FORCEINLINE void AuthorizeUser(const FString &UserName)
Definition App.h:194
static FFrameRate GetTimecodeFrameRate()
static FString GetGraphicsRHI()
static void SetCurrentFrameTime(FQualifiedFrameTime InFrameTime)
Definition App.h:676
static void InitializeSession()
static double IdleTimeOvershoot
Definition App.h:816
static bool bUseFixedTimeStep
Definition App.h:798
static void SetUseFixedTimeStep(bool bVal)
Definition App.h:510
static bool Standalone
Definition App.h:792
static FORCEINLINE bool IsProjectNameEmpty()
Definition App.h:168
static FORCEINLINE float GetVolumeMultiplier()
Definition App.h:692
static FORCEINLINE double GetIdleTimeOvershoot()
Definition App.h:616
static float VolumeMultiplier
Definition App.h:828
static EBuildTargetType GetBuildTargetType()
static FORCEINLINE bool IsStandalone()
Definition App.h:320
static float UnfocusedVolumeMultiplier
Definition App.h:831
static FString GetZenStoreProjectId()
static TArray< FString > SessionUsers
Definition App.h:789
static FString SessionName
Definition App.h:780
static FORCEINLINE bool IsGame()
Definition App.h:154
static bool IsUnattended()
static FORCEINLINE void SetProjectName(const TCHAR *InProjectName)
Definition App.h:178
static bool bUseFixedSeed
Definition App.h:764
static FORCEINLINE void SetSessionOwner(const FString &NewOwner)
Definition App.h:353
static bool IsEngineInstalled()
static double FixedDeltaTime
Definition App.h:801
static FString GetInstanceName()
Definition App.h:249
static void SetIdleTimeOvershoot(double Seconds)
Definition App.h:626
static EBuildConfiguration GetBuildConfiguration()
static FORCEINLINE bool UseVRFocus()
Definition App.h:729
static FString SessionOwner
Definition App.h:783
static int32 GetEngineIsPromotedBuild()
static void SetFixedDeltaTime(double Seconds)
Definition App.h:486
static const TCHAR * GetBuildVersion()
static FORCEINLINE void SetVolumeMultiplier(float InVolumeMultiplier)
Definition App.h:702
static FORCEINLINE double GetFixedDeltaTime()
Definition App.h:476
static void PrintStartupLogMessages()
static FORCEINLINE bool IsThisInstance(const FGuid &InInstanceId)
Definition App.h:331
static bool UseFixedTimeStep()
Definition App.h:496
static void SetHasFocusFunction(bool(*InHasFocusFunction)())
static FORCEINLINE FString GetSessionOwner()
Definition App.h:290
static double CurrentTime
Definition App.h:804
static bool HasFocus()
static FORCEINLINE void SetSessionName(const FString &NewName)
Definition App.h:342
static FString GetName()
Definition App.h:116
static FORCEINLINE bool HasProjectName()
Definition App.h:140
static FORCEINLINE FString GetSessionName()
Definition App.h:275
static FORCEINLINE double GetLastTime()
Definition App.h:540
static FORCEINLINE FGuid GetSessionId()
Definition App.h:265
static FORCEINLINE bool HasVRFocus()
Definition App.h:745
static FORCEINLINE bool IsBenchmarking()
Definition App.h:456
static bool bIsBenchmarking
Definition App.h:795
static bool bUseVRFocus
Definition App.h:834
static bool IsInstalled()
static FORCEINLINE TOptional< FQualifiedFrameTime > GetCurrentFrameTime()
Definition App.h:654
static float GetUnfocusedVolumeMultiplier()
static void SetCurrentTime(double Seconds)
Definition App.h:530
static void SetHasVRFocus(bool bInHasVRFocus)
static void SetDeltaTime(double Seconds)
Definition App.h:566
static TOptional< FQualifiedFrameTime > CurrentFrameTime
Definition App.h:822
static void SetTimecodeAndFrameRate(FTimecode InTimecode, FFrameRate InTimecodeFrameRate)
Definition App.h:666
static FORCEINLINE FGuid GetInstanceId()
Definition App.h:236
static FString GetEpicProductIdentifier()
static double IdleTime
Definition App.h:813
static double DeltaTime
Definition App.h:810
static FString GetBuildDate()
static void SetIdleTime(double Seconds)
Definition App.h:586
static void SetGraphicsRHI(FString RHIString)
static FORCEINLINE void DenyUser(const FString &UserName)
Definition App.h:215
static bool bHasVRFocus
Definition App.h:837
static FGuid SessionId
Definition App.h:777
static FORCEINLINE double GetGameTime()
Definition App.h:596
static FString GetBranchName()
static bool ShouldUseThreadingForPerformance()
static double LastTime
Definition App.h:807
static void SetBenchmarking(bool bVal)
Definition App.h:466
static bool bUseDropFrameFormatWhenSupported
Definition App.h:825
static INLINE_CANEVERRENDER bool CanEverRender()
Definition App.h:375
UE_NODISCARD int32 Find(const FString &SubStr, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase, ESearchDir::Type SearchDir=ESearchDir::FromStart, int32 StartPosition=INDEX_NONE) const
UE_NODISCARD FORCEINLINE FString Left(int32 Count) const &
FString & operator=(const FString &)=default
static const TCHAR * Get()
Definition Guid.h:108
friend bool operator==(const FGuid &X, const FGuid &Y)
Definition Guid.h:148
static FGuid NewGuid()
Definition Parse.h:20
FQualifiedFrameTime(const FTimecode &InTimecode, const FFrameRate &InRate)
static const TCHAR * ExecutableName(bool bRemoveExtension=true)
static const TCHAR * ComputerName()
static uint32 GetCurrentProcessId()