Hello I am new to Unity and scripting and need some guidance.
_
I am currently trying to make a guided tour that allows to see how visual impaired sees the world.
It is actually impossible right now with this technology to simulate. But im am making the tour for a architect class and they will experience it through Oculus Go. Already made something and made it work. But I want to change how you navigate inside the spheres. And I see now that it would be nice with some more C# knowledge.
_
I using the [Unity Documentation][1] to make this, but get this error.
_
Assets/Scripts/SetActiveCameraRigA.cs(76,39): error CS1061: Type UnityEngine.GameObject' does not contain a definition for
enabled’ and no extension method enabled' of type
UnityEngine.GameObject’ could be found. Are you missing an assembly reference?
_
And i made a [Google Doc][2] to show with pictures and code.
_
Can anyone help me? I would be so happy for any pointers from anyone!
_
[1]: Unity - Manual: Using more than one camera
[2]: Unity_Script_Shared - Google Docs
using UnityEngine;
using System.Collections;
public class SetActiveCameraRig : MonoBehaviour
{
public GameObject CameraRigA_Normal;
public GameObject CameraRigB_Cataract;
public GameObject CameraRigC_Glaucoma;
public GameObject CameraRigD_RetinitisPigmentosa;
public GameObject CameraRigE_DiabeticRetinopathy;
public GameObject CameraRigF_MaculaDegeneration;
//
public void NormalVision()
{
CameraRigA_Normal.enabled = true;
CameraRigB_Cataract.enabled = false;
CameraRigC_Glaucoma.enabled = false;
CameraRigD_RetinitisPigmentosa.enabled = false;
CameraRigE_DiabeticRetinopathy.enabled = false;
CameraRigF_MaculaDegeneration.enabled = false;
}
//
public void Cataract()
{
CameraRigA_Normal.enabled = false;
CameraRigB_Cataract.enabled = true;
CameraRigC_Glaucoma.enabled = false;
CameraRigD_RetinitisPigmentosa.enabled = false;
CameraRigE_DiabeticRetinopathy.enabled = false;
CameraRigF_MaculaDegeneration.enabled = false;
}
//
public void Glaucoma()
{
CameraRigA_Normal.enabled = false;
CameraRigB_Cataract.enabled = false;
CameraRigC_Glaucoma.enabled = true;
CameraRigD_RetinitisPigmentosa.enabled = false;
CameraRigE_DiabeticRetinopathy.enabled = false;
CameraRigF_MaculaDegeneration.enabled = false;
}
//
public void RetinitisPigmentosa()
{
CameraRigA_Normal.enabled = false;
CameraRigB_Cataract.enabled = false;
CameraRigC_Glaucoma.enabled = false;
CameraRigD_RetinitisPigmentosa.enabled = true;
CameraRigE_DiabeticRetinopathy.enabled = false;
CameraRigF_MaculaDegeneration.enabled = false;
}
//
public void DiabeticRetinopathy()
{
CameraRigA_Normal.enabled = false;
CameraRigB_Cataract.enabled = false;
CameraRigC_Glaucoma.enabled = false;
CameraRigD_RetinitisPigmentosa.enabled = false;
CameraRigE_DiabeticRetinopathy.enabled = true;
CameraRigF_MaculaDegeneration.enabled = false;
}
//
public void MaculaDegeneration()
{
CameraRigA_Normal.enabled = false;
CameraRigB_Cataract.enabled = false;
CameraRigC_Glaucoma.enabled = false;
CameraRigD_RetinitisPigmentosa.enabled = false;
CameraRigE_DiabeticRetinopathy.enabled = false;
CameraRigF_MaculaDegeneration.enabled = true;
}
}