当前位置:网站首页>Unity中.Meta文件作用详解
Unity中.Meta文件作用详解
2022-06-21 08:19:00 【kuilaurence】
如果你在游戏开发过程中使用诸如SVN的版本控制工具,那你必须得理解Meta文件的作用。
在游戏场景中引用一个游戏资源,Unity并不直接按照文件路径和名称,而是使用一个独一无二的GUID来指向工程里的该资源文件。这个GUID储存在Unity工程为每个资源和文件夹生成的Meta文件里。
使用GUID的好处就是,即使你移动、重命名或者修改资源的内容,这个资源仍然可以通过GUID来被引用(只要GUID不变,资源就能够被引用)。
缺点是你必须明确的意识到Meta文件是被关联到特定的资源上的,如果你删除了一个meta文件,Unity会认为原始的资源文件已经被删除,然后为这个“新的”资源文件生成一个新的GUID。这就是游戏场景中的资源引用中断的最常见原因。
除了GUID,meta文件还存储了有关资源导入的信息。例如,贴图资源在导入时可以当作标准贴图、法线贴图、GUI贴图、cookie或者光线贴图。这些导入设置都会被存储在meta文件里。
之前遇到一个问题,就是我上传到SVN的怪物Prefab,在策划那边查看出现“Missing Script”的问题,经检查,是该丢失的脚本的meta文件没有上传到SVN。所以,按照上面的理论,因而Prefab找不到该脚本的引用.
边栏推荐
- Wechat official account docking: push article information to official account with one click
- 1005 Spell It Right (20 分)(测试点3)
- 2022-2028 global cooling on-off valve industry research and trend analysis report
- How to write attractive titles for short videos? Learn these tips to make your title more convincing
- Blank screen of virtual machine browser
- [kotlin] first day
- [redis]-[redis underlying data structure] - Dictionary
- 1004 counting leaves (30 points)
- PS prompts "script error -50 general Photoshop error, how to solve it?
- 解密FTP
猜你喜欢

FD:文件描述符

CTF show WEB10

Introduction to testing - Software Test Model

showCTF Web入门题系列

Cluster hui dsm7 add suite source

2022-2028 global after sales spark plug industry research and trend analysis report

Listing of flaunting shares on Shenzhen Stock Exchange: market value of 4.2 billion, 9-month revenue decreased by 21% year-on-year

Eureka's timedsupersortask class (periodic task with automatic interval adjustment)

How can we make millions a year now?

Ads Filter Design Wizard tool I
随机推荐
Scientific research information | national natural conclusion regulations: more than 50% of the fund balance or it will not be concluded
26. Hikvision camera configuration and preliminary test
Fd: file descriptor
[kotlin] first day
Three declaration methods of structure type
Kotlin---- control statement
移动应用开发总结
Inline functions in kotlin
2022-2028 global cooling on-off valve industry research and trend analysis report
Redis master-slave vulnerability and remote connection vulnerability
Joking Domain Driven Design (VI) -- Boundary context -- Design
PS prompts "script error -50 general Photoshop error, how to solve it?
复数四则运算(二十三行简洁代码)
Blank screen of virtual machine browser
(对于换行符)gets和fgets的区别,puts和fputs的区别
日記(C語言總結)
Visual studio code annotation plug-in: korofileheader
General business plan
MySql 过滤查询(以字母开头,以数字开头,非数字开头,非字母开头)
Practical application cases of digital Twins - coal mine