unity中自适应
在fariygui 中可以自适应 在unity中就出现了图中的现象
代码是这样的
GRoot.inst.SetContentScaleFactor(750, 1334, UIContentScaler.ScreenMatchMode.MatchWidthOrHeight);
UIPackage.AddPackage("UI/MainUI");
GComponent gcom = UIPackage.CreateObject("MainUI", "main").asCom;
gcom.SetSize(GRoot.inst.width, GRoot.inst.height);
gcom.x = (GRoot.inst.width - gcom.width)/2;
这个设置导出apk 后 竖屏不对 横屏对
没有找到相关结果
已邀请:
2 个回复
xiatianjin
赞同来自:
tiance7
赞同来自: