第八节 制作像素点预制体
2019-06-19 本文已影响0人
安静的程序员
在开始编辑主屏幕的代码之前,需要制作一个预制体,否则主屏幕无法初始化。
01.导入像素点资源
导入Pixel.png至Resources文件夹下,并设置图片属性:
- Pixels Per Unit:1
- Pivot:Bottom Left
02.新建空物体
在场景中创建一个空物体,坐标归零,重命名为:Pixel
03.为空物体添加图片
将Pixel.png拖动至空物体Pixel上:

04.在Assets文件夹下新建文件夹Prefabs。
05.将场景中的Pixel对象拖动至预制体文件夹中,成功后,场景中的Pixel对象会变成蓝色,并且在预制体文件夹中会生成一个预制体Pixel。

