For my game UI requirements, I require to switch TvScreen in Normal and Maximal View/Size based on click of Toggle Button.
I have just tried to assign one Rect Transform to other Rect Transform but it is not working.
It just transferring reference data not actual component data like anchor point, pivot, position, scale and rotation.
I am attaching few images for TvScreen Rect Transform, Normal Screen Size Rect Transform and Maximum Screen Size Rect Transform.
Tv Screen With Its Rect Transform
Maximize Screen Size Rect Transform
At present, I have done this but it is not visually changing Tv Screen size.
public void OnFullscreenMediaButtonClick()
{
SoundManager.Instance.PlayButtonClickSound();
Debug.Log("maximize button clicked: " + isTvScreenMaximized);
if (!isTvScreenMaximized)
{
isTvScreenMaximized = true;
tvScreen = maximizeScreenRectTransform;
}
else
{
isTvScreenMaximized = false;
tvScreen = normalSizeScreenRectTransform;
}
}
I hope you got my question so please give your suggestion related to this.