File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed 
Packages/com.unity.inputsystem/InputSystem/Devices Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -508,10 +508,26 @@ public virtual void MakeCurrent()
508508        /// </summary> 
509509        /// <remarks> 
510510        /// This is called <em>after</em> the device has already been added. 
511-         /// </remarks> 
512511        /// <seealso cref="InputSystem.devices"/> 
513512        /// <seealso cref="InputDeviceChange.Added"/> 
514513        /// <seealso cref="OnRemoved"/> 
514+         /// </remarks> 
515+         /// <example> 
516+         /// <code> 
517+         /// using UnityEngine.InputSystem; 
518+         /// 
519+         /// public class MyDevice : InputDevice 
520+         /// { 
521+         ///     public static MyDevice current { get; private set; } 
522+         ///     protected override void OnAdded() 
523+         ///     { 
524+         ///         // use this context to assign the current device for instance 
525+         ///         base.OnAdded(); 
526+         ///         current = this; 
527+         ///     } 
528+         /// } 
529+         /// </code> 
530+         /// </example> 
515531        protected  virtual  void  OnAdded ( ) 
516532        { 
517533        } 
@@ -523,7 +539,7 @@ protected virtual void OnAdded()
523539        /// This is called <em>after</em> the device has already been removed. 
524540        /// <seealso cref="InputSystem.devices"/> 
525541        /// <seealso cref="InputDeviceChange.Removed"/> 
526-         /// <seealso cref="OnRemoved "/> 
542+         /// <seealso cref="OnAdded "/> 
527543        /// </remarks> 
528544        /// <example> 
529545        /// <code> 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments