unity ui get the canvas
Code Example - unity ui get the canvas
GetComponentInParent<Canvas>();
GetComponentInParent<Canvas>();