I am using C# scipt to use render texture and material. When I switch from 16:9 screen ratio to full screen on play, the GUI is in another location. How can I make it stay?
Would it be in the right place if I built the game in 16:9 and resized my screen?
Thank you!
note: even when dragging the screen to enlarge the scene view, the GUI gets out of place, while being in 16:9 the entire time.
Here is my script for minimap:
using UnityEngine;
public class minimapcee : MonoBehaviour {
public RenderTexture MiniMapTexture;
public Material MiniMapMaterial;
private float offset;
void Awake()
{
offset = 10;
}
void OnGUI()
{
if(Event.current.type == EventType.Repaint)
Graphics.DrawTexture(new Rect(14, 278, 88, 88), MiniMapTexture, MiniMapMaterial);
}
}