资源和运行时文件
Each time an asset is created or imported, the UnigineEditor creates a corresponding file and a *.meta file in the data folder of your project, it can also generate so-called "runtime files" when necessary.每次创建或导入资源, UnigineEditor 都会在项目的data文件夹中创建一个对应的文件和一个*.meta文件,它也可以生成所谓的“运行时”文件”。
Runtime files are files in UNIGINE's native format (such as .texture textures, .mesh geometry, .anim animations, etc.) used by the Engine at run time.运行时文件是引擎在运行时使用的UNIGINE原始格式的文件(例如压缩的.texture纹理,.mesh几何图形,.anim动画等)。
在运行时文件的上下文中,UNIGINE中的资源可以分为两组:
- For a native asset (in UNIGINE's native format) no runtime files are generated normally, as such an asset itself is treated and used as a runtime file.
Such assets are included in the final build "as is".A *.mesh or an image file can be treated as a non-native asset if the Unchanged option is disabled for it (a corresponding runtime file will be generated).对于本机资源(采用UNIGINE的本机格式),将不会生成任何运行时文件。这样的资源本身将被当作运行时文件使用。
- Such assets are included in the final build "as is".Such assets are included in the final build "as is".
- A *.mesh or an image file can be treated as a non-native asset if the Unchanged option is disabled for it (a corresponding runtime file will be generated).A *.mesh or an image file can be treated as a non-native asset if the Unchanged option is disabled for it (a corresponding runtime file will be generated).
- Such assets are included in the final build "as is".这些资源按原样包含在最终版本中。
- A *.mesh or an image file can be treated as a non-native asset if the Unchanged option is disabled for it (a corresponding runtime file will be generated).如果禁用了*.mesh选项的Unchanged选项,则可以将其视为非本地资源(将生成相应的运行时文件)。
- For a non-native asset (e.g. .fbx, .obj, .hdr, etc.) corresponding runtime file(s) will be generated in the data/.runtimes folder.
A particular case of a non-native asset is a container-asset — such assets have multiple runtime files generated for them (e.g. an FBX asset may produce .node, .mesh, .mat, etc. files).A particular case of a non-native asset is a container-asset — such assets have multiple runtime files generated for them (e.g. an FBX asset may produce .node, .mesh, .mat, etc. files).
A particular case of a non-native asset is a container-asset — such assets have multiple runtime files generated for them (e.g. an FBX asset may produce .node, .mesh, .mat, etc. files).对于非本地资源(例如.fbx,.obj,.hdr等),将在data/.runtimes文件夹中生成相应的运行时文件。A non-native asset may have no runtimes at all (e.g., a .txt file).A particular case of a non-native asset is a container-asset — such assets have multiple runtime files generated for them (e.g. an FBX asset may produce .node, .mesh, .mat, etc. files).非本地资源的一种特殊情况是容器资源-这样的资源具有为其生成的多个运行时文件(例如FBX资源可能生成.node,.mesh,.mat等文件)。
The following table shows the types of runtime files generated for certain types of assets.下表显示了为某些资源类型生成的运行时文件的类型。
非本地资源类型 | 生成的运行时文件 |
---|---|
*.fbx, *.dae, *.3ds |
Node (*.node)节点(*.node) Static Meshes (*.mesh)静态网格物体(*.mesh) Skinned Mesh Animations (*.anim)蒙皮网格动画(*.anim) Materials (*.mat)材质(*.mat) Textures (*.texture)纹理(*.texture) |
*.obj + *.mtl |
Node (*.node)节点(*.node) Static Meshes (*.mesh)静态网格物体(*.mesh) Materials (*.mat)材质(*.mat) Textures (*.texture)纹理(*.texture) |
*.png, *.jpg, *.tiff, *.dds, *tgs, *.rgb, *.rgba, *.psd, *.hdr, *.pgm, *.ppm, *.sgi | Texture (*.texture)纹理(*.texture) |
You can use assets_info and assets_list console commands to view information on non-native assets and runtimes generated for them.您可以使用assets_info和assets_list控制台命令来查看有关非本地资源和为其生成的运行时的信息。
To find a runtime file generated for an asset, right-click the asset in the Asset Browser and choose Show Runtime in Explorer in the context menu.要查找为资源生成的运行时文件,请在资源浏览器中右键单击资源,然后在上下文菜单中选择Show Runtime in Explorer。
也可以看看
- FileSystem article to learn more about accessing assets and runtime files. 文件系统文章 ,以了解有关访问资源和运行时文件的更多信息。
- API classes: API类: