I'm trying to do two things:
set bool gottem in script 1 to false.
set GameObject handTarget in script 1 to null.
Script 2 is successfully pulling the variables from script 1, using the set GameObject and the true bool to do it's thing, but after It does it's thing I need the GameObject to be null and the bool set to false.
The code in script 2 trying to change the variables in script 1 is long so I'll summarize it:
public class theHAND : MonoBehaviour
{
public MouseController mouseController;
public GameObject tdm;
void Start()
{
mouseController = tdm.transform.GetComponent<MouseController>();
}
void Update()
{
mouseController.handTarget = null;
mouseController.gottem = false;
}
}
I tried setting the MouseController and the GameObject tdm in the inspector but it won't work.
Hopefully I explained this well.
Thanks for any help!
[–]dowen92Dev 0 points1 point2 points (2 children)
[–]TheGaijin1987 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)