修改RectTransform的值,修改UI位置

2021-10-06 12:59:14 字數 849 閱讀 6990

recttrans.setinsetandsizefromparentedge(recttransform.edge.left, 0, 0);

recttrans.setinsetandsizefromparentedge(recttransform.edge.top, 0, 0);

recttrans.anchormin = vector2.zero;

recttrans.anchormax = vector2.one;

第乙個是乙個edge型別的值,需要指定以父物件的哪個邊為基準(也就是上面四個值之中的乙個);

第二個引數,是離指定邊的距離;

第三個引數,是本身的寬度或者高度;

//改變recttransform的top

getcomponent().offsetmax = new vector2(getcomponent().offsetmax.x, top);

//改變recttransform的bottom

getcomponent().offsetmin = new vector2(getcomponent().offsetmin.x, bottom);

//改變recttransform的width,height

getcomponent().sizedelta = new vector2(width, height);

//改變recttransform的pos

getcomponent().anchoredposition3d = new vector3(posx,posy,posz);

getcomponent().anchoredposition = new vector2(posx,posy);

修改mysql mode mysql修改sql

sql modeansi traditional strict trans tables sql mode為空 最寬鬆的模式,即使有錯誤既不會報錯也不會有警告 ansi 寬鬆模式,對插入資料進行校驗,如果不符合定義型別或長度,對資料型別調整或截斷儲存,報warning警告 traditional 嚴...

mysql point 修改 mysql 修改

啟動資料庫服務 service mysqld start 連線資料庫 mysql u root password 載入資料 source sql 刪除資料庫 drop database db name 資料庫自增操作 1 建立 時新增 create table tablename id int au...

修改DNS 修改IP 修改網管 相關問題

修改dns etc resolv.conf修改ip etc sysconfig network scripts ifcfg eth0 網絡卡 設定nds 閘道器 ip等 修改閘道器 gateway gateway etc sysconfig network 正確連通,還要正確配置 ping ping...