I’m working on a version of my game to display on an older arcade monitor running at 240p, which is half 480p on both dimensions. However, I cannot seem to get Unity to use anything lower then 480p, even when trying to manually set the resolution in a script after setting up my video card to scale to 240p. Has anyone figured out a way to do this? Anyway, that’s not my major issue right now; it’s resolution scaling.
If I can’t get it to run at 240p, I’d like to be able to upscale a 240p render texture and display it at whichever resolution the game is running at. I was able to get this working in the editor, but when I try to run it in a build, everything is just black. While running fraps, the fps counter draws over itself like the whole thing isn’t refreshing or something. Anyone have any ideas? Here is my code that works in the editor:
#pragma strict
var renderSizeX : int = 320;
var renderSizeY : int = 240;
var renderTex : RenderTexture;
function Start () {
renderTex = RenderTexture(renderSizeX,renderSizeY,24,RenderTextureFormat.Default);
renderTex.filterMode=FilterMode.Point;
renderTex.Create();
camera.targetTexture=renderTex;
}
function Update () {
}
function OnGUI() {
if(renderTex){
GUI.BeginGroup (Rect (0, 0, Screen.width,Screen.height));
GUI.DrawTexture(Rect(0,0,Screen.width,Screen.height),renderTex);
GUI.EndGroup ();
}
}