I have this component "Physical Raycaster" and I want to disable/enable it through a js script.
Normally I use this code, but I can't figure out the name for the Raycaster?!
#pragma strict
var targetGameobject : GameObject;
function Start () {
targetGameobject.GetComponent(NAME RAYCASTER).enabled = false;
}
Try this:
targetGameobject.GetComponent<UnityEngine.EventSystems.PhysicsRaycaster>().enabled = false;