首先确认开发分辨率,以移动平台为例,主流的分辨率比例是16:9,暂定开发分辨率16:9,设置Orthographicz正交摄像机
这里的size 的含义是屏幕的一般,也就是640/2=320,由于sprite默认的Pixels Per Unit设置的是100,所以 320/100=3.2
脚本代码:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Script_06_01 :