【屏幕适配】修改ipad适配的方式
parent
955af5caa9
commit
6d4dd819f8
|
|
@ -62,6 +62,7 @@ function UIManager.Initialize()
|
||||||
gameObj.name = "UIRoot"
|
gameObj.name = "UIRoot"
|
||||||
this.eventSystem = GameObject.Find("EventSystem")
|
this.eventSystem = GameObject.Find("EventSystem")
|
||||||
this.uiRoot = gameObj
|
this.uiRoot = gameObj
|
||||||
|
this.canvasScaler = gameObj.transform:Find("UIRoot"):GetComponent("CanvasScaler")
|
||||||
this.uiNode = gameObj.transform:Find("UIRoot/UINode")
|
this.uiNode = gameObj.transform:Find("UIRoot/UINode")
|
||||||
this.fullNode = gameObj.transform:Find("UIRoot/FullNode")
|
this.fullNode = gameObj.transform:Find("UIRoot/FullNode")
|
||||||
this.fixedNode = gameObj.transform:Find("UIRoot/FixedNode")
|
this.fixedNode = gameObj.transform:Find("UIRoot/FixedNode")
|
||||||
|
|
@ -117,16 +118,8 @@ function UIManager.Adapter()
|
||||||
UIManager.width = Screen.width
|
UIManager.width = Screen.width
|
||||||
UIManager.height = Screen.height
|
UIManager.height = Screen.height
|
||||||
|
|
||||||
-- 计算比例因子 比例因子 = 10^((lg(屏幕宽/开发宽)+lg(屏幕高/开发高)/2))
|
|
||||||
local log = math.log( Screen.width / 1080, 10) + math.log(Screen.height / 1920, 10)
|
|
||||||
local avg = log/2
|
|
||||||
local ft = math.pow(10, avg)
|
|
||||||
-- 实际分辨率 = 屏幕分辨率 / 比例因子
|
|
||||||
UIManager.UIHeight = Screen.height / ft
|
|
||||||
UIManager.UIWidth = Screen.width / ft
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.canvasScaler.matchWidthOrHeight = 0.5
|
||||||
-- 计算屏幕比例的比值,用于部分界面进行屏幕适配的缩放
|
-- 计算屏幕比例的比值,用于部分界面进行屏幕适配的缩放
|
||||||
UIManager.adapterScale = (1920/1080)/(Screen.height / Screen.width)
|
UIManager.adapterScale = (1920/1080)/(Screen.height / Screen.width)
|
||||||
-- ui实际大小
|
-- ui实际大小
|
||||||
|
|
@ -135,6 +128,15 @@ function UIManager.Adapter()
|
||||||
|
|
||||||
local n = Screen.height / Screen.width
|
local n = Screen.height / Screen.width
|
||||||
if n > standard then
|
if n > standard then
|
||||||
|
-- 计算比例因子 比例因子 = 10^((lg(屏幕宽/开发宽)+lg(屏幕高/开发高)/2))
|
||||||
|
local log = math.log( Screen.width / 1080, 10) + math.log(Screen.height / 1920, 10)
|
||||||
|
local avg = log/2
|
||||||
|
local ft = math.pow(10, avg)
|
||||||
|
-- 实际分辨率 = 屏幕分辨率 / 比例因子
|
||||||
|
UIManager.UIHeight = Screen.height / ft
|
||||||
|
UIManager.UIWidth = Screen.width / ft
|
||||||
|
|
||||||
|
|
||||||
local rectTransform = this.uiNode.gameObject:GetComponent("RectTransform")
|
local rectTransform = this.uiNode.gameObject:GetComponent("RectTransform")
|
||||||
rectTransform.offsetMin = Vector2.New(rectTransform.offsetMin.x, rectTransform.offsetMin.y + UIManager.Offset.Bottom)
|
rectTransform.offsetMin = Vector2.New(rectTransform.offsetMin.x, rectTransform.offsetMin.y + UIManager.Offset.Bottom)
|
||||||
rectTransform.offsetMax = Vector2.New(rectTransform.offsetMax.x, rectTransform.offsetMax.y - UIManager.Offset.Top)
|
rectTransform.offsetMax = Vector2.New(rectTransform.offsetMax.x, rectTransform.offsetMax.y - UIManager.Offset.Top)
|
||||||
|
|
@ -159,9 +161,14 @@ function UIManager.Adapter()
|
||||||
elseif n < standard then
|
elseif n < standard then
|
||||||
-- 计算屏幕比例的比值,用于部分界面进行屏幕适配的缩放
|
-- 计算屏幕比例的比值,用于部分界面进行屏幕适配的缩放
|
||||||
UIManager.adapterScale = 1
|
UIManager.adapterScale = 1
|
||||||
|
this.canvasScaler.matchWidthOrHeight = 1
|
||||||
|
|
||||||
local w = 1920 / Screen.height * Screen.width
|
-- 实际分辨率 = 屏幕分辨率 / 比例因子
|
||||||
local f = (w-1080) / 2
|
UIManager.UIHeight = 1920
|
||||||
|
UIManager.UIWidth = 1920 * (Screen.width/Screen.height)
|
||||||
|
|
||||||
|
-- local w = 1920 / Screen.height * Screen.width
|
||||||
|
local f = (UIManager.UIWidth-1080) / 2
|
||||||
UIManager.Offset.Left = f
|
UIManager.Offset.Left = f
|
||||||
UIManager.Offset.Right = f
|
UIManager.Offset.Right = f
|
||||||
|
|
||||||
|
|
@ -572,21 +579,6 @@ function UIManager.CloseStackPanel(uiConfig,isDestroy)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIManager.PreLoadPanel(id, func)
|
|
||||||
local uiConfig = UIConfig[id]
|
|
||||||
if(uiConfig == nil) then
|
|
||||||
LogError("UIManager====>没有找到UI的配置信息:"..id)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local prefab = resMgr:LoadAsset(uiConfig.assetName)
|
|
||||||
if prefab == nil then
|
|
||||||
LogError("预加载资源失败!! 没有找到对应的资源!! key:"..uiConfig.id..",assetName:"..uiConfig.assetName)
|
|
||||||
resMgr:UnLoadAsset(uiConfig.assetName)
|
|
||||||
end
|
|
||||||
if func then func() end
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
--加载面板
|
--加载面板
|
||||||
function UIManager.CreatePanel(uiConfig, parent)
|
function UIManager.CreatePanel(uiConfig, parent)
|
||||||
local prefab = resMgr:LoadAsset(uiConfig.assetName)
|
local prefab = resMgr:LoadAsset(uiConfig.assetName)
|
||||||
|
|
|
||||||
|
|
@ -186,6 +186,7 @@ public static class CustomSettings
|
||||||
|
|
||||||
|
|
||||||
_GT(typeof(Canvas)),
|
_GT(typeof(Canvas)),
|
||||||
|
_GT(typeof(CanvasScaler)),
|
||||||
_GT(typeof(MaskableGraphic)).AddExtendType(typeof(DG.Tweening.ShortcutExtensions46)),
|
_GT(typeof(MaskableGraphic)).AddExtendType(typeof(DG.Tweening.ShortcutExtensions46)),
|
||||||
_GT(typeof(RectTransform)).AddExtendType(typeof(DG.Tweening.ShortcutExtensions46)),
|
_GT(typeof(RectTransform)).AddExtendType(typeof(DG.Tweening.ShortcutExtensions46)),
|
||||||
_GT(typeof(Text)).AddExtendType(typeof(DG.Tweening.ShortcutExtensions46)),
|
_GT(typeof(Text)).AddExtendType(typeof(DG.Tweening.ShortcutExtensions46)),
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,423 @@
|
||||||
|
//this source code was auto-generated by tolua#, do not modify it
|
||||||
|
using System;
|
||||||
|
using LuaInterface;
|
||||||
|
|
||||||
|
public class UnityEngine_UI_CanvasScalerWrap
|
||||||
|
{
|
||||||
|
public static void Register(LuaState L)
|
||||||
|
{
|
||||||
|
L.BeginClass(typeof(UnityEngine.UI.CanvasScaler), typeof(UnityEngine.EventSystems.UIBehaviour));
|
||||||
|
L.RegFunction("__eq", op_Equality);
|
||||||
|
L.RegFunction("__tostring", ToLua.op_ToString);
|
||||||
|
L.RegVar("uiScaleMode", get_uiScaleMode, set_uiScaleMode);
|
||||||
|
L.RegVar("referencePixelsPerUnit", get_referencePixelsPerUnit, set_referencePixelsPerUnit);
|
||||||
|
L.RegVar("scaleFactor", get_scaleFactor, set_scaleFactor);
|
||||||
|
L.RegVar("referenceResolution", get_referenceResolution, set_referenceResolution);
|
||||||
|
L.RegVar("screenMatchMode", get_screenMatchMode, set_screenMatchMode);
|
||||||
|
L.RegVar("matchWidthOrHeight", get_matchWidthOrHeight, set_matchWidthOrHeight);
|
||||||
|
L.RegVar("physicalUnit", get_physicalUnit, set_physicalUnit);
|
||||||
|
L.RegVar("fallbackScreenDPI", get_fallbackScreenDPI, set_fallbackScreenDPI);
|
||||||
|
L.RegVar("defaultSpriteDPI", get_defaultSpriteDPI, set_defaultSpriteDPI);
|
||||||
|
L.RegVar("dynamicPixelsPerUnit", get_dynamicPixelsPerUnit, set_dynamicPixelsPerUnit);
|
||||||
|
L.EndClass();
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int op_Equality(IntPtr L)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ToLua.CheckArgsCount(L, 2);
|
||||||
|
UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
|
||||||
|
bool o = arg0 == arg1;
|
||||||
|
LuaDLL.lua_pushboolean(L, o);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int get_uiScaleMode(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
UnityEngine.UI.CanvasScaler.ScaleMode ret = obj.uiScaleMode;
|
||||||
|
ToLua.Push(L, ret);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index uiScaleMode on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int get_referencePixelsPerUnit(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
float ret = obj.referencePixelsPerUnit;
|
||||||
|
LuaDLL.lua_pushnumber(L, ret);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index referencePixelsPerUnit on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int get_scaleFactor(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
float ret = obj.scaleFactor;
|
||||||
|
LuaDLL.lua_pushnumber(L, ret);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index scaleFactor on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int get_referenceResolution(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
UnityEngine.Vector2 ret = obj.referenceResolution;
|
||||||
|
ToLua.Push(L, ret);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index referenceResolution on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int get_screenMatchMode(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
UnityEngine.UI.CanvasScaler.ScreenMatchMode ret = obj.screenMatchMode;
|
||||||
|
ToLua.Push(L, ret);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index screenMatchMode on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int get_matchWidthOrHeight(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
float ret = obj.matchWidthOrHeight;
|
||||||
|
LuaDLL.lua_pushnumber(L, ret);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index matchWidthOrHeight on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int get_physicalUnit(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
UnityEngine.UI.CanvasScaler.Unit ret = obj.physicalUnit;
|
||||||
|
ToLua.Push(L, ret);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index physicalUnit on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int get_fallbackScreenDPI(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
float ret = obj.fallbackScreenDPI;
|
||||||
|
LuaDLL.lua_pushnumber(L, ret);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index fallbackScreenDPI on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int get_defaultSpriteDPI(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
float ret = obj.defaultSpriteDPI;
|
||||||
|
LuaDLL.lua_pushnumber(L, ret);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index defaultSpriteDPI on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int get_dynamicPixelsPerUnit(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
float ret = obj.dynamicPixelsPerUnit;
|
||||||
|
LuaDLL.lua_pushnumber(L, ret);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index dynamicPixelsPerUnit on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int set_uiScaleMode(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
UnityEngine.UI.CanvasScaler.ScaleMode arg0 = (UnityEngine.UI.CanvasScaler.ScaleMode)ToLua.CheckObject(L, 2, typeof(UnityEngine.UI.CanvasScaler.ScaleMode));
|
||||||
|
obj.uiScaleMode = arg0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index uiScaleMode on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int set_referencePixelsPerUnit(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
|
||||||
|
obj.referencePixelsPerUnit = arg0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index referencePixelsPerUnit on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int set_scaleFactor(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
|
||||||
|
obj.scaleFactor = arg0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index scaleFactor on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int set_referenceResolution(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
UnityEngine.Vector2 arg0 = ToLua.ToVector2(L, 2);
|
||||||
|
obj.referenceResolution = arg0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index referenceResolution on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int set_screenMatchMode(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
UnityEngine.UI.CanvasScaler.ScreenMatchMode arg0 = (UnityEngine.UI.CanvasScaler.ScreenMatchMode)ToLua.CheckObject(L, 2, typeof(UnityEngine.UI.CanvasScaler.ScreenMatchMode));
|
||||||
|
obj.screenMatchMode = arg0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index screenMatchMode on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int set_matchWidthOrHeight(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
|
||||||
|
obj.matchWidthOrHeight = arg0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index matchWidthOrHeight on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int set_physicalUnit(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
UnityEngine.UI.CanvasScaler.Unit arg0 = (UnityEngine.UI.CanvasScaler.Unit)ToLua.CheckObject(L, 2, typeof(UnityEngine.UI.CanvasScaler.Unit));
|
||||||
|
obj.physicalUnit = arg0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index physicalUnit on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int set_fallbackScreenDPI(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
|
||||||
|
obj.fallbackScreenDPI = arg0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index fallbackScreenDPI on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int set_defaultSpriteDPI(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
|
||||||
|
obj.defaultSpriteDPI = arg0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index defaultSpriteDPI on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||||
|
static int set_dynamicPixelsPerUnit(IntPtr L)
|
||||||
|
{
|
||||||
|
object o = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
o = ToLua.ToObject(L, 1);
|
||||||
|
UnityEngine.UI.CanvasScaler obj = (UnityEngine.UI.CanvasScaler)o;
|
||||||
|
float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
|
||||||
|
obj.dynamicPixelsPerUnit = arg0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return LuaDLL.toluaL_exception(L, e, o, "attempt to index dynamicPixelsPerUnit on a nil value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9fbb3b77bd4bd044ca41541b170c8f26
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Loading…
Reference in New Issue