// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System; namespace Microsoft.MixedReality.Toolkit { /// /// Generic interface for all Mixed Reality Services /// public interface IMixedRealityService : IDisposable { /// /// Optional Priority attribute if multiple services of the same type are required, enables targeting a service for action. /// string Name { get; } /// /// Optional Priority to reorder registered managers based on their respective priority, reduces the risk of race conditions by prioritizing the order in which managers are evaluated. /// uint Priority { get; } /// /// The configuration profile for the service. /// /// /// Many services may wish to provide a typed version (ex: MixedRealityInputSystemProfile) that casts this value for ease of use in calling code. /// BaseMixedRealityProfile ConfigurationProfile { get; } /// /// The initialize function is used to setup the service once created. /// This method is called once all services have been registered in the Mixed Reality Toolkit. /// /// This will run both in edit mode and in play mode. Gate code behind `Application.isPlaying` if it should only run in one or the other. void Initialize(); /// /// Optional Reset function to perform that will Reset the service, for example, whenever there is a profile change. /// void Reset(); /// /// Optional Enable function to enable / re-enable the service. /// void Enable(); /// /// Optional Update function to perform per-frame updates of the service. /// void Update(); /// /// Optional LateUpdate function to that is called after Update has been called on all services. /// void LateUpdate(); /// /// Optional Disable function to pause the service. /// void Disable(); /// /// Optional Destroy function to perform cleanup of the service before the Mixed Reality Toolkit is destroyed. /// void Destroy(); } }