Unity3D资源管理架构
在Unity3D引擎中,场景资源文件(.unity)是以2进制格式存储的,但同时它也有一种基于文本的表现格式。可在Edit>Project Setting>Editor 中设置:
1.使用binary2text.exe(win下目录:Editor\Data\Tools)可将.unity文件转换成.txt文件,只需将.unity文件拖拽到binary2text.exe上即可生成.txt;
2.Bin2Text.unity为测试场景场景中只有一个名为“sakyaer”的空物体;
3.对应这样一个场景,它的文本格式使用YAML格式存储,信息表如下:
- 其中ClassID是Unity3D中类的序列编号,如:GameObject类ClassID=1,具体类的ID参照官方网站http://docs.unity3d.com/Manual/ClassIDReference.html
- ID项为随记分配给每个实例的唯一标识
- 资源文件使用m_作为前缀
- 其中m_GameObject (file 0 path 1163297905)表现transform对gameobject的从属关系
External ReferencesID: 1 (ClassID: 29) SceneSettingsm_ObjectHideFlags 0 (unsigned int)m_PVSData (vector)size 0 (int)m_PVSObjectsArray (vector)size 0 (int)m_PVSPortalsArray (vector)size 0 (int)m_OcclusionBakeSettings (OcclusionBakeSettings)smallestOccluder 5 (float)smallestHole 0.25 (float)backfaceThreshold 100 (float)ID: 2 (ClassID: 104) RenderSettingsm_Fog 0 (bool)m_FogColor (0.5 0.5 0.5 1) (ColorRGBA)m_FogMode 3 (int)m_FogDensity 0.01 (float)m_LinearFogStart 0 (float)m_LinearFogEnd 300 (float)m_AmbientLight (0.2 0.2 0.2 1) (ColorRGBA)m_SkyboxMaterial (file 0 path 0) (PPtr<Material>)m_HaloStrength 0.5 (float)m_FlareStrength 1 (float)m_FlareFadeSpeed 3 (float)m_HaloTexture (file 0 path 0) (PPtr<Texture2D>)m_SpotCookie (file 0 path 0) (PPtr<Texture2D>)m_ObjectHideFlags 0 (unsigned int)ID: 3 (ClassID: 127) LevelGameManagerm_ObjectHideFlags 0 (unsigned int)ID: 4 (ClassID: 157) LightmapSettingsm_ObjectHideFlags 0 (unsigned int)m_LightProbes (file 0 path 0) (PPtr<LightProbes>)m_Lightmaps (vector)size 0 (int)m_LightmapsMode 1 (int)m_BakedColorSpace 0 (int)m_UseDualLightmapsInForward 0 (bool)m_LightmapEditorSettings (LightmapEditorSettings)m_Resolution 50 (float)m_LastUsedResolution 0 (float)m_TextureWidth 1024 (int)m_TextureHeight 1024 (int)m_BounceBoost 1 (float)m_BounceIntensity 1 (float)m_SkyLightColor (0.86 0.93 1 1) (ColorRGBA)m_SkyLightIntensity 0 (float)m_Quality 0 (int)m_Bounces 1 (int)m_FinalGatherRays 1000 (int)m_FinalGatherContrastThreshold 0.05 (float)m_FinalGatherGradientThreshold 0 (float)m_FinalGatherInterpolationPoints 15 (int)m_AOAmount 0 (float)m_AOMaxDistance 0.1 (float)m_AOContrast 1 (float)m_LODSurfaceMappingDistance 1 (float)m_Padding 0 (int)m_TextureCompression 0 (bool)m_LockAtlas 0 (bool)ID: 5 (ClassID: 196) NavMeshSettingsm_ObjectHideFlags 0 (unsigned int)m_BuildSettings (NavMeshBuildSettings)agentRadius 0.5 (float)agentHeight 2 (float)agentSlope 45 (float)agentClimb 0.4 (float)ledgeDropHeight 0 (float)maxJumpAcrossDistance 0 (float)accuratePlacement 0 (bool)minRegionArea 2 (float)widthInaccuracy 16.6667 (float)heightInaccuracy 10 (float)m_NavMesh (file 0 path 0) (PPtr<NavMesh>)ID: 1163297905 (ClassID: 1) GameObjectm_ObjectHideFlags 0 (unsigned int)m_PrefabParentObject (file 0 path 0) (PPtr<EditorExtension>)m_PrefabInternal (file 0 path 0) (PPtr<Prefab>)m_Component (vector)size 1 (int)data (pair)first 4 (int)second (file 0 path 1163297906) (PPtr<Component>)m_Layer 0 (unsigned int)m_Name "Sakyaer" (string)m_TagString "Untagged" (string)m_Icon (file 0 path 0) (PPtr<Texture2D>)m_NavMeshLayer 0 (unsigned int)m_StaticEditorFlags 0 (unsigned int)m_IsActive 1 (bool)ID: 1163297906 (ClassID: 4) Transformm_ObjectHideFlags 0 (unsigned int)m_PrefabParentObject (file 0 path 0) (PPtr<EditorExtension>)m_PrefabInternal (file 0 path 0) (PPtr<Prefab>)m_GameObject (file 0 path 1163297905) (PPtr<GameObject>)m_LocalRotation (Quaternionf)x 0 (float)y 0 (float)z 0 (float)w 1 (float)m_LocalPosition (0 0 0) (Vector3f)m_LocalScale (1 1 1) (Vector3f)m_Children (vector)size 0 (int)m_Father (file 0 path 0) (PPtr<Transform>)m_RootOrder 0 (int)
4.Unity3D中对于每一个资源文件都会生成对应.meta文件,该文件可以用记事本直接打开;guid(全局唯一标识符,Globally Unique Identifier)是系统随机生成的对资源的标识符,guid在游戏运行时会被用来生成一个hashid;而根据guid的前两位0a可以在工程Library目录下metadate(元数据)0a目录下找到,对应的二进制文件,该文件可以使用binary2text.exe打开,得到的txt文件,记录了.meta文件对应资源的所有详细信息。
guid: 0a4a878577c88654795d8c6aee74368d
参考文献:http://docs.unity3d.com/Manual/TextualSceneFormat.html
Unity3D资源管理架构相关推荐
- Slurm资源管理架构
Slurm资源管理架构 1.Slurm架构 通过集中式的slurmctld来管理和控制资源,充当控制节点.每个计算节点都有一个守护进程,称为slurmd.slurmdbd 负责记录在数据库中slu ...
- Unity3D资源管理——Unity2017 Assetbundle依赖打包
Unity3D资源管理--Unity2017 Assetbundle依赖打包 http://gad.qq.com/article/detail/289272 一.运行环境 1.1编辑器版本 使用Uni ...
- Unity3d 引擎原理详细介绍、Unity3D引擎架构设计
体系结构 为了更好地理解游戏的软件架构和对象模型,它获得更好的外观仅有一名Unity3D的游戏引擎和编辑器是非常有用的,它的主要原则. Unity3D 引擎 Unity3D的是一个屡获殊荣的工具,用于 ...
- Unity3d 引擎原理详细介绍、Unity3D引擎架构设计 - zhibolife
时间 2014-03-24 11:18:00 博客园-所有随笔区原文 http://www.cnblogs.com/zhibolife/p/3620440.html 体系结构 为了更好地理解游戏的 ...
- Unity3d 引擎原理详细介绍、Unity3D引擎架构设计- zhibolife(转载分享)
体系结构 为了更好地理解游戏的软件架构和对象模型,它获得更好的外观仅有一名Unity3D的游戏引擎和编辑器是非常有用的,它的主要原则. Unity3D 引擎 Unity3D的是一个屡获殊荣的工具,用于 ...
- unity3d资源管理
游戏中通常有大量资源,如网格.材质.纹理.动画.着色器程序和音乐等,游戏引擎作为做游戏的工具,自然要提供良好的资源管理,让游戏开发者用最简单的方式使用资源.游戏引擎的资源管理包括两大部分:离线资源管理 ...
- 适用于独立游戏开发的Unity3D 网络游戏架构设计
最近在GitChat上发布了一个网络游戏框架教程,目标是带领读者搭建一个商业游戏的网络架构设计,该架构设计是游戏的核心技术,将采用 Unity 2017.2 最新版本作为开发工具.内容分为 UI 架构 ...
- Unity3D研究:Unity3D引擎架构设计
组件(Component)这个概念最早是在2005年<Game Programming Gems 5>的<Component Based Object Management>中 ...
- Unity3D之游戏架构脚本该如何来写
这篇文章主要想大家说明一下我在Unity3D游戏开发中是如何写游戏脚本的,对于Unity3D这套游戏引擎来说入门极快,可是要想做好却非常的难.这篇文章的目的是让哪些已经上手Unity3D游戏引擎的朋友 ...
最新文章
- 深度解析:mPaaS 3.0全新组件
- 利用python进行数据分析 百度云-利用Python进行数据分析 原书第2版.pdf
- bilibili有电脑版吗_你体验过电脑版的《和平精英》吗?不用担心内存,也不用担心卡顿...
- IntelliJ IDEA使用技巧——自动生成 serialVersionUID 的方法
- OpenGL pipeline (very important)
- win10 解决升级 WordPress 时提示”另一更新正在进行”
- ACdream1157 Segments(CDQ分治 + 线段树)
- android底部弹出显示不全,Android 解决 NestedScrollView 底部内容被遮挡显示不全
- 数据结构树的基本操作_数据结构二叉树的基本操作~~~~
- hive中groupby优化_Hive 查询优化总结
- Spark HA 集群搭建【1、基于文件系统的手动HA 2、基于zk的自动HA】
- 【UVA133】The Dole Queue(环下标的求法)
- c语言编写单片机中断,C语言AVR单片机中断程序写法
- 云空间插html音乐,【详细教程】如何在空间中引用网易云音乐
- 2014微软校园招聘笔试试题(英文)
- 微信公众号检测本地App, 安装则打开,未安装则下载的实现方式
- matlab中的灰色预测,灰色预测MATLAB程序
- # 互动媒体期末作业——P5.js“画板”
- 虚拟机配置固定网关及用Xshell连接虚拟机IP
- move lob会不会影响其他索引状态?