Skip to content

Commit 972c909

Browse files
committed
Removed more calls to GetComponent<DisplayInterface>
1 parent 764bba6 commit 972c909

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

OSVR-Unity/Assets/OSVRUnity/src/VRHead.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void Update()
9090
{
9191
//if the display configuration hasn't initialized, ping the DisplayInterface to retrieve it from the ClientKit
9292
//this would mean DisplayInterface was unable to retrieve that data in its Start() function.
93-
GetComponent<DisplayInterface>().ReadDisplayPath();
93+
_displayInterface.ReadDisplayPath();
9494
}
9595
else if (!_initDisplayInterface && _displayInterface.Initialized)
9696
{
@@ -211,7 +211,7 @@ void Init()
211211
/// </summary>
212212
private void GetDeviceDescription()
213213
{
214-
_deviceDescriptor = GetComponent<DisplayInterface>().GetDeviceDescription();
214+
_deviceDescriptor = _displayInterface.GetDeviceDescription();
215215
if (_deviceDescriptor != null)
216216
{
217217
switch (_deviceDescriptor.DisplayMode)

0 commit comments

Comments
 (0)