28 lines
700 B
C#
28 lines
700 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class SwapLeftHandToGlass : MonoBehaviour
|
|
{
|
|
public GameObject raycaster;
|
|
public GameObject controller1;
|
|
public GameObject controller2;
|
|
bool glassenabled = false;
|
|
|
|
// Start is called before the first frame update
|
|
public void Swap()
|
|
{
|
|
if(!glassenabled){
|
|
raycaster.SetActive(false);
|
|
controller1.SetActive(false);
|
|
controller2.SetActive(true);
|
|
}
|
|
else{
|
|
raycaster.SetActive(true);
|
|
controller1.SetActive(true);
|
|
controller2.SetActive(false);
|
|
}
|
|
glassenabled = !glassenabled;
|
|
}
|
|
}
|