27 lines
541 B
C#
27 lines
541 B
C#
using UnityEngine;
|
|
|
|
public class LocomotionController : MonoBehaviour
|
|
{
|
|
public OVRCameraRig CameraRig;
|
|
|
|
public CharacterController CharacterController;
|
|
|
|
public OVRPlayerController PlayerController;
|
|
|
|
private void Start()
|
|
{
|
|
if (CharacterController == null)
|
|
{
|
|
CharacterController = GetComponentInParent<CharacterController>();
|
|
}
|
|
if (PlayerController == null)
|
|
{
|
|
PlayerController = GetComponentInParent<OVRPlayerController>();
|
|
}
|
|
if (CameraRig == null)
|
|
{
|
|
CameraRig = Object.FindObjectOfType<OVRCameraRig>();
|
|
}
|
|
}
|
|
}
|