// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System; using UnityEngine; using UnityEngine.Events; namespace Microsoft.MixedReality.Toolkit.UI.BoundsControl { /// /// Event to inform subscribers that the proximity objects have changed /// public class ProximityObjectsChangedEvent : UnityEvent { } /// /// Interface for defining a proximity object provider used in of /// ProximityEffectObjectProviders are responsible for providing gameobjects that are scaled / visually altered in ProximityEffect. /// public interface IProximityEffectObjectProvider { /// /// Returns true if the provider has any visible objects /// bool IsActive { get; set; } /// /// Base Material is applied to any proximity scaled object whenever in medium or far/no proximity mode /// Material GetBaseMaterial(); /// /// Provides the highlighted material that gets applied to any proximity scaled object in close proximity mode /// Material GetHighlightedMaterial(); /// /// Returns the original object size of the provided proximity scaled objects /// float GetObjectSize(); /// /// This method allows iterating over the proximity scaled visuals. It should return the gameobject the scaling should be applied to. /// void ForEachProximityObject(Action action); /// /// Allow for accessing / subscribing to the changed event for objects that show a proximity effect /// ProximityObjectsChangedEvent ProximityObjectsChanged { get; } } }