Пытаюсь сделать основу vr игры по туториалу, но тут всплыла проблема
NullReferenceException: Object reference not set to an instance of an object
HandPresence.Update () (at Assets/HandPresence.cs:56)
и из-за этой проблемы у меня на контроллерах отображается и контроллеры и "руки". Пытался убирать некоторые части кода и после того как убрать код в update ничего не меняется. 
вот сам код (пометил 56 строку) и вот ссылка на видео человека с таймкодом https://youtu.be/VdT0zMcggTQ?t=912
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR;
public class HandPresence : MonoBehaviour
{
public bool showController = false;
public InputDeviceCharacteristics controllerCharacteristics;
public List<GameObject> controllerPrefabs;
public GameObject handModelPrefab;
private InputDevice targetDevice;
private GameObject spawnedController;
private GameObject spawnedHandModel;
// Start is called before the first frame update
void Start()
{
List<InputDevice> devices = new List<InputDevice>();
// InputDeviceCharacteristics rightControllerCharacteristics = InputDeviceCharacteristics.Right | InputDeviceCharacteristics.Controller;
InputDevices.GetDevicesWithCharacteristics(controllerCharacteristics, devices);
foreach (var item in devices)
{
Debug.Log(item.name + item.characteristics);
}
if (devices.Count > 0)
{
targetDevice = devices[0];
GameObject prefab = controllerPrefabs.Find(controller => controller.name == targetDevice.name);
if (prefab)
{
Instantiate(prefab, transform);
}
else
{
Debug.LogError("Did not find corresponding controller model");
spawnedController = Instantiate(controllerPrefabs[0], transform);
}
spawnedHandModel = Instantiate(handModelPrefab, transform);
}
}
// Update is called once per frame
void Update()
{
if(showController)
{
spawnedHandModel.SetActive(false);
spawnedController.SetActive(true);
}
else
{
spawnedController.SetActive(false); // 56 строка
spawnedHandModel.SetActive(true);
}
}
}