Skip to content

Commit ce79af9

Browse files
committed
Updates for Unity 5 compatibility.
1 parent 046c709 commit ce79af9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

OSVR-Unity/Assets/OSVRUnity/Sample/Demo/Scripts/Objects/ColorChanger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class ColorChanger : MonoBehaviour, IColorChanger
4242
#region Init
4343
void Awake()
4444
{
45-
_material = renderer.materials[materialID];
45+
_material = GetComponent<Renderer>().materials[materialID];
4646
}
4747
#endregion
4848

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ protected bool CheckSupport (bool needDepth) {
113113
}
114114

115115
if(needDepth)
116-
camera.depthTextureMode |= DepthTextureMode.Depth;
116+
GetComponent<Camera>().depthTextureMode |= DepthTextureMode.Depth;
117117

118118
return true;
119119
}

0 commit comments

Comments
 (0)