unity while on trigger code example
Example: unity while in trigger
void OnTriggerStay(Collider other)
{
Debug.Log("This will be called every frame");
if (Input.GetKeyDown("space") && other.tag == "TalkCylinder")
{
Debug.Log("Talking");
}
}