docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SlowTaskModule

    Manages tasks that run at regular intervals

    Inheritance
    object
    Object
    ScriptableObject
    ScriptableSettingsBase
    ScriptableSettingsBase<SlowTaskModule>
    ScriptableSettings<SlowTaskModule>
    SlowTaskModule
    Implements
    IModuleBehaviorCallbacks
    IModuleMarsUpdate
    IModule
    IProvidesSlowTasks
    IFunctionalityProvider
    Inherited Members
    ScriptableSettings<SlowTaskModule>.instance
    ScriptableSettingsBase<SlowTaskModule>.k_HasCustomPath
    ScriptableSettingsBase<SlowTaskModule>.s_Instance
    ScriptableSettingsBase<SlowTaskModule>.Save(string)
    ScriptableSettingsBase<SlowTaskModule>.GetFilePath()
    ScriptableSettingsBase.k_PathExceptionMessage
    ScriptableSettingsBase.GetInstanceByType(Type)
    ScriptableSettingsBase.OnLoaded()
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.InstantiateAsync<T>(T, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, InstantiateParameters, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate<T>(T, InstantiateParameters)
    Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.MARS.MARSUtils
    Assembly: Unity.MARS.dll
    Syntax
    [MovedFrom("Unity.MARS")]
    public class SlowTaskModule : ScriptableSettings<SlowTaskModule>, IModuleBehaviorCallbacks, IModuleMarsUpdate, IModule, IProvidesSlowTasks, IFunctionalityProvider

    Methods

    AddMarsTimeSlowTask(Action, float, bool)

    Registers the given task and starts it running at regular intervals based on MARS time

    Declaration
    public bool AddMarsTimeSlowTask(Action action, float sleepTime, bool replace = false)
    Parameters
    Type Name Description
    Action action
    float sleepTime

    The amount of time to wait between executions

    bool replace

    (Optional) Whether this should replace existing parameters for task if it has already been registered

    Returns
    Type Description
    bool

    True if the task has not already been added or if replace is true, false otherwise

    AddSlowTask(Action, float, bool)

    Registers the given task and starts it running at regular intervals based on game time

    Declaration
    public bool AddSlowTask(Action action, float sleepTime, bool replace = false)
    Parameters
    Type Name Description
    Action action
    float sleepTime

    The amount of time to wait between executions

    bool replace

    (Optional) Whether this should replace existing parameters for task if it has already been registered

    Returns
    Type Description
    bool

    True if the task has not already been added or if replace is true, false otherwise

    ClearTasks()

    Declaration
    public void ClearTasks()

    RemoveMarsTimeSlowTask(Action)

    Unregisters the given MARS-time task and stops running it

    Declaration
    public bool RemoveMarsTimeSlowTask(Action task)
    Parameters
    Type Name Description
    Action task

    The task to remove

    Returns
    Type Description
    bool

    True if the task was successfully found and removed, false otherwise

    RemoveSlowTask(Action)

    Unregisters the given task and stops running it

    Declaration
    public bool RemoveSlowTask(Action task)
    Parameters
    Type Name Description
    Action task

    The task to remove

    Returns
    Type Description
    bool

    True if the task was successfully found and removed, false otherwise

    Implements

    Unity.XRTools.ModuleLoader.IModuleBehaviorCallbacks
    IModuleMarsUpdate
    Unity.XRTools.ModuleLoader.IModule
    IProvidesSlowTasks
    Unity.XRTools.ModuleLoader.IFunctionalityProvider
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)