나는 웹 서버에 내 Unity 게임을 업로드하고 페이스 북에서 작업했습니다. 하지만 페이스 북 캔버스 해상도 문제가 있습니다. 내 게임이 세로 모드이기 때문입니다. 화면 해상도는 400 x 600입니다 ..
Unity 프로젝트에서이 해상도를 어떻게 설정합니까? 페이스 북 설정으로 캔버스 너비를 설정할 수 없습니다.
사용 가능한 메서드가 있습니다 : FB.Canvas.SetResolution (int width, int height, bool fullscreen, int prefferedRefreshRate, Params Fbscreen.Layout [] layoutparams)
나는 어떤 facebook 레이아웃 매개 변수를 써야하는지 알지 못한다.
도와주세요 ..
귀하의 도움과 지원에 감사드립니다 .. :)
Facebook의 샘플 예제에 제공된 아래 코드를 사용하여 문제를 해결했습니다.
#region FB.Canvas.SetResolution example
public string Width = "800";
public string Height = "600";
public bool CenterHorizontal = true;
public bool CenterVertical = false;
public string Top = "10";
public string Left = "10";
public void CallCanvasSetResolution()
{
int width;
if (!Int32.TryParse(Width, out width))
{
width = 800;
}
int height;
if (!Int32.TryParse(Height, out height))
{
height = 600;
}
float top;
if (!float.TryParse(Top, out top))
{
top = 0.0f;
}
float left;
if (!float.TryParse(Left, out left))
{
left = 0.0f;
}
if (CenterHorizontal && CenterVertical)
{
FB.Canvas.SetResolution(width, height, false, 0, FBScreen.CenterVertical(), FBScreen.CenterHorizontal());
}
else if (CenterHorizontal)
{
FB.Canvas.SetResolution(width, height, false, 0, FBScreen.Top(top), FBScreen.CenterHorizontal());
}
else if (CenterVertical)
{
FB.Canvas.SetResolution(width, height, false, 0, FBScreen.CenterVertical(), FBScreen.Left(left));
}
else
{
FB.Canvas.SetResolution(width, height, false, 0, FBScreen.Top(top), FBScreen.Left(left));
}
}
#endregion
여러분 모두에게 도움이되기를 바랍니다 .. 감사합니다 ..
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다