当前位置:网站首页>[unity introduction program] basic concept - preform prefab
[unity introduction program] basic concept - preform prefab
2022-07-25 07:33:00 【flashinggg】
Catalog
1 The function of prefabricated parts
2 Definition of prefabricated parts
3 Advantages of prefabricated parts
4 Creation of prefabricated parts & Use
Official documents
my Unity edition
2021.3.6
1 The function of prefabricated parts
unity We usually need to add some rigid bodies to game objects 、 Collision body and other components achieve some effects , But when you meet the same NPC、 When the props in the scene need to be reused in the scene , If you just add components step by step , It's going to be very inefficient , This is what we want to package the same object that needs to be copied , Copy and paste directly when you need it .
Prefabricated parts are unity A resource type provided to the user to implement the above operations .
2 Definition of prefabricated parts
- Preforms (prefab) It's a kind of assert The resource type ;
- Prefabricated parts are used to store game objects (GameObject) Object and its supporting components and properties ;
- Prefabricated parts act as a form function , It is a reusable resource template ;
3 Advantages of prefabricated parts
Since it is a packaged resource template , Then the advantages are clearly visible . It can easily modify the content of the project on a large scale , There is no need to edit every single object repeatedly , Save a lot of time .
4 Creation of prefabricated parts & Use
4.1 establish
- Right click the folder -> Create -> Prefab, You can create a prefabricated part ;


- Drag the object in the scene that you want to copy to this prefabrication resource -> There is no selection in the pop-up prompt box Replace -> Create a reusable resource template ;


- here , The icon in front of the original object has also changed , From wireframe -> Solid ; There are also more property panels Prefab attribute .


4.2 Use
It's easy to use , Or drag it directly Scene View , or ctrl+D copying .
边栏推荐
- Analysis of difficulties in diagramscene project
- 论文阅读:UNET 3+: A FULL-SCALE CONNECTED UNET FOR MEDICAL IMAGE SEGMENTATION
- Learn no when playing 10. Is enterprise knowledge management too boring? Use it to solve!
- QT6 with vs Code: compiling source code and basic configuration
- Learn no when playing 9 | enterprise knowledge management is so simple because it uses
- BOM overview
- [cloud native] the ribbon is no longer used at the bottom of openfeign, which started in 2020.0.x
- Paper reading: UNET 3+: a full-scale connected UNET for medical image segmentation
- Pads export Gerber file
- Talk about programmers learning English again
猜你喜欢

【论文笔记】Next-ViT: Next Generation Vision Transformer for Efficient Deployment in Realistic Industrial

nanodet训练时出现问题:ModuleNotFoundError: No module named ‘nanodet‘的解决方法

9 best engineering construction project management systems

【软件测试】包装简历从这几点出发、提升通过率

Summary of differences between data submission type request payload and form data

QT learning diary 20 - aircraft war project

Analysis of difficulties in diagramscene project

Lidar construction map (overlay grid construction map)

【Unity入门计划】基本概念-GameObject&Components

Nailing the latest version, how to clear the login phone number history data
随机推荐
北京内推 | 微软STCA招聘NLP/IR/DL方向研究型实习生(可远程)
How to use network installation to deploy multiple virtual servers in KVM environment
BOM概述
Before Oracle 19C migration, how important is it to do a good job of rat playback test?
《游戏机图鉴》:一份献给游戏玩家的回忆录
Quickly build a centralized logging platform through elk
Gather the wisdom of developers and consolidate the foundation of the database industry
Have you got the advanced usage of pytest?
"Game illustrated book": a memoir dedicated to game players
What are runtimecompiler and runtimeonly
On the peak night of the 8 Oracle ace gathering, what technology hotspots did you talk about?
华为无线设备配置WAPI-证书安全策略
用VS Code搞Qt6:编译源代码与基本配置
LeetCode118. 杨辉三角
About --skip networking in gbase 8A
Robot framework mobile terminal Automation Test ----- 01 environment installation
深度学习制作数据集时,从长视频中指定每隔多少帧提取一张图像到指定文件路径的方法
QT learning diary 20 - aircraft war project
Polling, interrupt, DMA and channel
Configuring WAPI certificate security policy for Huawei wireless devices