Example #1
0
 /// <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);
     }
 }
Example #2
0
 /// <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));
     }
 }
Example #3
0
 /// <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);
     }
 }
Example #4
0
        /// <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);
        }
Example #5
0
        /// <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);
        }
Example #6
0
 /// <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);
     }
 }
Example #7
0
 /// <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);
     }
 }
Example #8
0
 /// <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);
     }
 }
Example #9
0
 /// <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);
     }
 }
Example #10
0
 /// <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);
     }
 }
Example #11
0
 /// <summary>
 /// Sets if VRFocus should be used.
 /// </summary>
 /// <param name="useVRFocus"></param>
 public static void SetUseVRFocus(bool useVRFocus)
 {
     Native_FApp.SetUseVRFocus(useVRFocus);
 }
Example #12
0
 /// <summary>
 /// Sets the Unfocused Volume Multiplier
 /// </summary>
 public static void SetUnfocusedVolumeMultiplier(float volumeMultiplier)
 {
     Native_FApp.SetUnfocusedVolumeMultiplier(volumeMultiplier);
 }
Example #13
0
 /// <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());
 }
Example #14
0
 /// <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);
 }
Example #15
0
 /// <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);
 }
Example #16
0
 /// <summary>
 /// Gets the value of ENGINE_IS_PROMOTED_BUILD.
 /// </summary>
 public static bool GetEngineIsPromotedBuild()
 {
     return(Native_FApp.GetEngineIsPromotedBuild());
 }
Example #17
0
 /// <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());
 }
Example #18
0
 /// <summary>
 /// Updates Last time to CurrentTime.
 /// </summary>
 public static void UpdateLastTime()
 {
     Native_FApp.UpdateLastTime();
 }
Example #19
0
 /// <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());
 }
Example #20
0
 /// <summary>
 /// Sets current time in seconds.
 /// </summary>
 /// <param name="seconds">Time in seconds.</param>
 public static void SetCurrentTime(double seconds)
 {
     Native_FApp.SetCurrentTime(seconds);
 }
Example #21
0
 /// <summary>
 /// Gets current time in seconds.
 /// </summary>
 /// <returns>Current time in seconds.</returns>
 public static double GetCurrentTime()
 {
     return(Native_FApp.GetCurrentTime());
 }
Example #22
0
 /// <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);
 }
Example #23
0
 /// <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());
 }
Example #24
0
 /// <summary>
 /// Gets if VRFocus should be used
 /// </summary>
 /// <returns></returns>
 public static bool UseVRFocus()
 {
     return(Native_FApp.UseVRFocus());
 }
Example #25
0
 /// <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);
 }
Example #26
0
 /// <summary>
 /// Gets time delta in seconds.
 /// </summary>
 /// <returns>Time delta in seconds.</returns>
 public static double GetDeltaTime()
 {
     return(Native_FApp.GetDeltaTime());
 }
Example #27
0
 /// <summary>
 /// Sets time delta in seconds.
 /// </summary>
 /// <param name="seconds">Time in seconds.</param>
 public static void SetDeltaTime(double seconds)
 {
     Native_FApp.SetDeltaTime(seconds);
 }
Example #28
0
 /// <summary>
 /// Gets idle time in seconds.
 /// </summary>
 /// <returns>Idle time in seconds.</returns>
 public static double GetIdleTime()
 {
     return(Native_FApp.GetIdleTime());
 }
Example #29
0
 /// <summary>
 /// Gets previous value of CurrentTime.
 /// </summary>
 /// <returns>Previous value of CurrentTime.</returns>
 public static double GetLastTime()
 {
     return(Native_FApp.GetLastTime());
 }
Example #30
0
 /// <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());
 }