/// <summary> /// Set a new session owner. /// @see SetSessionName /// </summary> /// <param name="newOwner">The name of the new owner.</param> public static void SetSessionOwner(string newOwner) { using (FStringUnsafe newOwnerUnsafe = FStringPool.New(newOwner)) { Native_FApp.SetSessionOwner(ref newOwnerUnsafe.Array); } }
/// <summary> /// Check whether the specified user is authorized to interact with this session. /// @see AuthorizeUser, DenyUser, DenyAllUsers /// </summary> /// <param name="userName">The name of the user to check.</param> /// <returns>true if the user is authorized, false otherwise.</returns> public static bool IsAuthorizedUser(string userName) { using (FStringUnsafe userNameUnsafe = FStringPool.New(userName)) { return(Native_FApp.IsAuthorizedUser(ref userNameUnsafe.Array)); } }
/// <summary> /// Set a new session name. /// @see SetSessionOwner /// </summary> /// <param name="newName">The new session name.</param> public static void SetSessionName(string newName) { using (FStringUnsafe newNameUnsafe = FStringPool.New(newName)) { Native_FApp.SetSessionName(ref newNameUnsafe.Array); } }
/// <summary> /// Gets the identifier of the session that this application is part of. /// /// A session is group of applications that were launched and logically belong together. /// For example, when starting a new session in UFE that launches a game on multiple devices, /// all engine instances running on those devices will have the same session identifier. /// Conversely, sessions that were launched separately will have different session identifiers. /// /// @see GetInstanceId /// </summary> /// <returns>Session identifier, or an invalid GUID if there is no local instance.</returns> public static Guid GetSessionId() { Guid result; Native_FApp.GetSessionId(out result); return(result); }
/// <summary> /// Gets the globally unique identifier of this application instance. /// /// Every running instance of the engine has a globally unique instance identifier /// that can be used to identify it from anywhere on the network. /// /// @see GetSessionId /// </summary> /// <returns>Instance identifier, or an invalid GUID if there is no local instance.</returns> public static Guid GetInstanceId() { Guid result; Native_FApp.GetInstanceId(out result); return(result); }
/// <summary> /// Remove the specified user from the list of authorized session users. /// @see AuthorizeUser, DenyAllUsers, IsAuthorizedUser /// </summary> /// <param name="userName">The name of the user to remove.</param> public static void DenyUser(string userName) { using (FStringUnsafe userNameUnsafe = FStringPool.New(userName)) { Native_FApp.DenyUser(ref userNameUnsafe.Array); } }
/// <summary> /// Sets the name of the current project. /// </summary> /// <param name="projectName">Name of the current project.</param> public static void SetProjectName(string projectName) { using (FStringUnsafe projectNameUnsafe = FStringPool.New(projectName)) { Native_FApp.SetProjectName(ref projectNameUnsafe.Array); } }
/// <summary> /// Gets the name of the user who owns the session that this application is part of, if any. /// /// If this application is part of a session that was launched from UFE, this function /// will return the name of the user that launched the session. If this application is /// not part of a session, this function will return the name of the local user account /// under which the application is running. /// </summary> /// <returns>Name of session owner.</returns> public static string GetSessionOwner() { using (FStringUnsafe resultUnsafe = FStringPool.New()) { Native_FApp.GetSessionOwner(ref resultUnsafe.Array); return(resultUnsafe.Value); } }
/// <summary> /// Gets the identifier for the unreal engine /// </summary> public static string GetEpicProductIdentifier() { using (FStringUnsafe resultUnsafe = FStringPool.New()) { Native_FApp.GetEpicProductIdentifier(ref resultUnsafe.Array); return(resultUnsafe.Value); } }
/// <summary> /// Gets the date at which this application was built. /// </summary> /// <returns>Build date string.</returns> public static string GetBuildDate() { using (FStringUnsafe resultUnsafe = FStringPool.New()) { Native_FApp.GetBuildDate(ref resultUnsafe.Array); return(resultUnsafe.Value); } }
/// <summary> /// Sets if VRFocus should be used. /// </summary> /// <param name="useVRFocus"></param> public static void SetUseVRFocus(bool useVRFocus) { Native_FApp.SetUseVRFocus(useVRFocus); }
/// <summary> /// Sets the Unfocused Volume Multiplier /// </summary> public static void SetUnfocusedVolumeMultiplier(float volumeMultiplier) { Native_FApp.SetUnfocusedVolumeMultiplier(volumeMultiplier); }
/// <summary> /// Helper function to get UnfocusedVolumeMultiplier from config and store so it's not retrieved every frame /// </summary> /// <returns>Volume multiplier to use when app loses focus</returns> public static float GetUnfocusedVolumeMultiplier() { return(Native_FApp.GetUnfocusedVolumeMultiplier()); }
/// <summary> /// Sets idle time in seconds. /// </summary> /// <param name="seconds">Idle time in seconds.</param> public static void SetIdleTime(double seconds) { Native_FApp.SetIdleTime(seconds); }
/// <summary> /// Sets application benchmarking mode. /// </summary> /// <param name="val">True sets application in benchmark mode, false sets to non-benchmark mode.</param> public static void SetBenchmarking(bool val) { Native_FApp.SetBenchmarking(val); }
/// <summary> /// Gets the value of ENGINE_IS_PROMOTED_BUILD. /// </summary> public static bool GetEngineIsPromotedBuild() { return(Native_FApp.GetEngineIsPromotedBuild()); }
/// <summary> /// Gets VRFocus, which indicates that the application should continue to render /// Audio and Video as if it had window focus, even though it may not. /// </summary> /// <returns></returns> public static bool HasVRFocus() { return(Native_FApp.HasVRFocus()); }
/// <summary> /// Updates Last time to CurrentTime. /// </summary> public static void UpdateLastTime() { Native_FApp.UpdateLastTime(); }
/// <summary> /// Checks whether the application should run multi-threaded for performance critical features. /// /// This method is used for performance based threads (like rendering, task graph). /// This will not disable async IO or similar threads needed to disable hitching /// </summary> /// <returns>true if this isn't a server, has more than one core, does not have a -onethread command line options, etc.</returns> public static bool ShouldUseThreadingForPerformance() { return(Native_FApp.ShouldUseThreadingForPerformance()); }
/// <summary> /// Sets current time in seconds. /// </summary> /// <param name="seconds">Time in seconds.</param> public static void SetCurrentTime(double seconds) { Native_FApp.SetCurrentTime(seconds); }
/// <summary> /// Gets current time in seconds. /// </summary> /// <returns>Current time in seconds.</returns> public static double GetCurrentTime() { return(Native_FApp.GetCurrentTime()); }
/// <summary> /// Enables or disabled usage of fixed time step. /// </summary> /// <param name="val">whether to use fixed time step or not</param> public static void SetUseFixedTimeStep(bool val) { Native_FApp.SetUseFixedTimeStep(val); }
/// <summary> /// Gets whether we want to use a fixed time step or not. /// </summary> /// <returns>True if using fixed time step, false otherwise.</returns> public static bool UseFixedTimeStep() { return(Native_FApp.UseFixedTimeStep()); }
/// <summary> /// Gets if VRFocus should be used /// </summary> /// <returns></returns> public static bool UseVRFocus() { return(Native_FApp.UseVRFocus()); }
/// <summary> /// Sets VRFocus, which indicates that the application should continue to render /// Audio and Video as if it had window focus, even though it may not. /// </summary> /// <param name="hasVRFocus">new VRFocus value</param> public static void SetHasVRFocus(bool hasVRFocus) { Native_FApp.SetHasVRFocus(hasVRFocus); }
/// <summary> /// Gets time delta in seconds. /// </summary> /// <returns>Time delta in seconds.</returns> public static double GetDeltaTime() { return(Native_FApp.GetDeltaTime()); }
/// <summary> /// Sets time delta in seconds. /// </summary> /// <param name="seconds">Time in seconds.</param> public static void SetDeltaTime(double seconds) { Native_FApp.SetDeltaTime(seconds); }
/// <summary> /// Gets idle time in seconds. /// </summary> /// <returns>Idle time in seconds.</returns> public static double GetIdleTime() { return(Native_FApp.GetIdleTime()); }
/// <summary> /// Gets previous value of CurrentTime. /// </summary> /// <returns>Previous value of CurrentTime.</returns> public static double GetLastTime() { return(Native_FApp.GetLastTime()); }
/// <summary> /// Checks whether application is in benchmark mode. /// </summary> /// <returns>true if application is in benchmark mode, false otherwise.</returns> public static bool IsBenchmarking() { return(Native_FApp.IsBenchmarking()); }