Prefabs
【Prefabs】
A Prefab is a type of asset -- a reusable GameObject stored in Project View. Prefabs can be inserted into any number of scenes, multiple times per scene. When you add a Prefab to a scene, you create an instance of it. All Prefab instances are linked to the original Prefab and are essentially clones of it. No matter how many instances exist in your project, when you make any changes to the Prefab you will see the change applied to all instances.
Creating Prefabs
In order to create a Prefab, simply drag a GameObject that you've created in the scene into the Project View. The GameObject's name will turn blue to show that it is a Prefab. You can rename your new Prefab.
After you have performed these steps, the GameObject and all its children have been copied into the Prefab data. The Prefab can now be re-used in multiple instances. The original GameObject in the Hierarchy has now become an instance of the Prefab.
Prefab Instances
To create a Prefab instance in the current scene, drag the Prefab from the Project View into the Scene or Hierarchy View. This instance is linked to the Prefab, as displayed by the blue text used for their name in the Hierarchy View.
- If you have selected a Prefab instance, and want to make a change that affects all instances, you can click the Select button in the Inspector to select the source Prefab.
Prefabs的更多相关文章
- Prefabs实例化 ResourceMgr
http://www.xiaobao1993.com/886.html 来源与小宝个人笔记[稍作修改] //使用 Prefabs/Resources/stone1 ResourceMgr.GetIn ...
- 游戏对象、组件和Prefabs
如标题所言,本文由3个部分组成,分别讲述游戏对象.组件和Prefabs(预设体). 1. 游戏对象 任何游戏对象都由组件组成,组件是实现一切功能所必需的.我们创建的对象会在Hierarchy视图中显示 ...
- Unity -- 材质-Material和预设体-Prefabs
材质(Materials)用来把网格(Mesh)或粒子渲染器(Particle Renderers)贴到游戏对象上.他们在定义对象怎么被显示发挥重要组成部分.材质包括用于呈现网状或颗粒着色器的参考,所 ...
- Unity Prefabs
通过上一期的学习,我们知道为了如何向场景中添加一个物体.问题来了,如果需要对这个立方体进行修改应该怎么做呢?那我们肯定就得修改这段代码,能不能将立方体本身从我们的开发中单独提出来呢?这就涉及到我们今天 ...
- Unity3d学习 预设体(prefab)的一些理解
之前一直在想如果要在Unity3d上创建很多个具有相同结构的对象,是如何做的,后来查了相关资料发现预设体可以解决这个问题! 预设体的概念: 组件的集合体 , 预制物体可以实例化成游戏对象. 创建预设体 ...
- 2DToolkit官方文档中文版打地鼠教程(三):Sprite Collections 精灵集合
这是2DToolkit官方文档中 Whack a Mole 打地鼠教程的译文,为了减少文中过多重复操作的翻译,以及一些无必要的句子,这里我假设你有Unity的基础知识(例如了解如何新建Sprite等) ...
- 2DToolkit官方文档中文版打地鼠教程(二):设置摄像机
这是2DToolkit官方文档中 Whack a Mole 打地鼠教程的译文,为了减少文中过多重复操作的翻译,以及一些无必要的句子,这里我假设你有Unity的基础知识(例如了解如何新建Sprite等) ...
- 2DToolkit官方文档中文版打地鼠教程(一):初始设置
这是2DToolkit官方文档中 Whack a Mole 打地鼠教程的译文,为了减少文中过多重复操作的翻译,以及一些无必要的句子,这里我假设你有Unity的基础知识(例如了解如何新建Sprite等) ...
- Phaser-游戏之旅
虽然这个小游戏逻辑不是很复杂,但为了熟悉Phaser这个游戏框架的使用方法所以就选择了它. 另外第一次在项目中尝试使用ES6,之后利用babel进行转换. 自动化构建:gulp(其他文件复制和解析) ...
随机推荐
- android 使用代码实现 RelativeLayout布局
只需把代码copy进入oncreate方法即可运行 RelativeLayout rl = new RelativeLayout(this); Button btn1 = new Button(thi ...
- xxx cannot be resolved to a type 错误解决方法
(1)jdk不匹配(或不存在) 项目指定的jdk为“jdk1.6.0_18”,而当前eclipse使用的是“jdk1.6.0_22”.需要在BuildPath | Libraries,中做简单 ...
- window.location.href 放置在单独的JS文件中使用时问题
场景:假设当前浏览器地址栏的地址是:http://localhost:8888/SSHBoot/tourist/homeMainAction_signInUI.do, 现在我想在点击按钮时定位到“ht ...
- 51nod1346 递归
我终于知道我有多么蠢了...推规律根本不带我这么推的...跟51nod那场比赛的傻逼B题一样,想都不想想就打表找规律...智障啊找规律也要按照基本法! //f[1][2]=a[1][2] f[2][1 ...
- 在Eclipse中运行cmd
第一步:设置一个新的外部配置工具 在 Eclipse 中,选择 “Run -> External Tools -> External Tools Configurations” 第二步: ...
- (转)Mac OS X写了个rm时将文件放入回收站的小工具
上次由于公司里机器要面临重装,开始仓皇地将Mac本里的文件scp到我的台式机上.忙乱之中本来要删除一个无用的文件夹的,结果用rm -rf的时候tab了一下,补全出来的文件都没看清就按下了回车,毫无疑问 ...
- 安装完eclipse,dbwear后,需要在他们解压文件.ini下加上你liux的jdk的安装路径,才能正常使用
-vm/usr/java/jdk/jdk1.6.0_45/bin/java
- PhoneGap与Jquery Mobile结合开发android应用配置
由于工作需要,用到phonegap与jquery moblie搭配,开发android应用程序. 这些技术自己之前也都没接触过,可以说是压根没听说过,真是感慨,在开发领域,技术日新月异,知识真是永远学 ...
- GitHub入门:如何上传与下载工程?
由于经常要在家写代码,所以需要有个能够方便访问代码管理工具.最近尝试了一下GitHub.经过了一翻纠结之后,基本上掌握了他的使用方式. 要使用GitHub需要首先在其网站上进行注册.其官方网站是ht ...
- DataGridView固定了列名,怎样将数据内容绑定在列上
留心驿站 原文 其实很简单,在DataGridView上右键选择编辑列,在数据一项中找到DataPropertyName,在里面写上对应的要绑定的数据中的字段名,即可 .比如:从数据库中选择的data ...