ue4多人协作编辑场景_多场景编辑

ue4多人协作编辑场景_多场景编辑

ue4多人协作编辑场景

Unity 5.x发行周期中将包含许多激动人心的新功能,但我们也在对现有功能和工作流程进行改进。 这些领域之一是我们的关卡管理和场景编辑。 (Many exciting new features are coming as part of the Unity 5.x release cycle, but we are also making improvements to our existing features and workflows. One of those areas is our level management and scene editing.)

For various reasons, it is sometimes necessary to divide a game level into multiple scenes in Unity. This could be because the level is big and/or you want to support streaming of parts of the level. You might also decide to divide the level to make it easier for multiple people to work on the same level without creating too many conflicts in the scene files.

由于各种原因,有时需要在Unity中将游戏级别划分为多个场景。 这可能是因为该级别很大和/或您想支持该级别部分的流式传输。 您可能还决定划分级别,以使多个人更轻松地在同一级别上工作,而不会在场景文件中产生太多冲突。

Whatever your reasons for dividing a level into multiple scenes were, you probably had to write some editor tools for supporting multiple scenes. If you used it for level streaming, you probably wanted to have multiple scenes in the editor in order to align geometry properly or maybe you wanted to combine multiple scenes into one scene before building the player.

无论将级别划分为多个场景的原因是什么,您可能都必须编写一些编辑器工具来支持多个场景。 如果将其用于关卡流,则可能要在编辑器中包含多个场景以正确对齐几何图形,或者您可能想在构建播放器之前将多个场景组合为一个场景。

At runtime in the player it is already possible to load multiple scenes at once using APIs like Application.LoadLevelAdditive. Unfortunately, there has never been the equivalent UnloadLevel. So while loading additional data is straightforward, unloading data required for you to do bookkeeping of the game objects created when loading additional data or to structure your scene in a way that made it easy to destroy the scene again.

在播放器中的运行时,已经可以使用诸如Application.LoadLevelAdditive之类的 API一次加载多个场景。 不幸的是,从来没有等效的UnloadLevel 。 因此,尽管加载其他数据很简单,但是卸载所需的数据就可以对加载附加数据时创建的游戏对象进行簿记或以易于再次破坏场景的方式来构造场景。

For those of you who are familiar with these issues, we would like to introduce you to the SceneManager. The SceneManager is a new API that makes it easy for you to manage your scene at runtime. It handles all the necessary bookkeeping of game objects, so you do not have to think about which game objects to destroy when unloading a level.

对于那些熟悉这些问题的人,我们想向您介绍SceneManager 。 SceneManager是一个新的API,可让您轻松在运行时管理场景。 它处理所有必要的游戏对象簿记,因此您不必考虑卸载关卡时要销毁的游戏对象。

Loading a scene additively is simple a matter of calling SceneManager.LoadSceneAdditive(“MyScene”), unloading the scene again is simply SceneManager.UnloadScene(“MyScene”).

只需通过调用SceneManager.LoadSceneAdditive(“ MyScene”)即可简单地添加一个场景,再次仅通过SceneManager.UnloadScene(“ MyScene”)即可卸载该场景。

There are a few more APIs for handling which scene newly created game object are added to and moving game objects between scenes hierarchically (not spatially) as well as asynchronous versions of the load scene APIs, so you can keep you player busy while loading other parts of your game level.

还有一些API用于处理添加到哪个场景的新创建的游戏对象以及在场景之间分层(而非空间)移动游戏对象,以及加载场景API的异步版本,因此您可以在加载其他部分时让玩家保持忙碌状态游戏级别。

On top of the SceneManager you can implement the level loading or streaming that suits your game, whether that be based on tunnels and portals or player proximity is completely up to you.

在SceneManager的顶部,您可以实施适合您游戏的关卡加载或流式传输,无论是基于隧道和门户,还是完全取决于玩家。

In the Editor, we have used the SceneManager to implement what we call Multi Scene Editing. This feature allows you to have multiple scenes loaded at the same time in the Editor and will look somewhat like this:

在编辑器中,我们使用了SceneManager来实现所谓的“ 多场景编辑” 。 此功能使您可以在编辑器中同时加载多个场景,外观如下所示:

Now it will be easy to align you level objects across scenes and move objects between scenes. We are working on how to support the baking of navmesh, lightmap and occlusion culling with multiple scenes loaded. The goal is to have it all working together smoothly.

现在,您可以轻松地在整个场景中对齐对象并在场景之间移动对象。 我们正在研究如何支持加载多个场景的导航网格,光照贴图和遮挡剔除的烘焙。 目标是使所有这些工作顺利进行。

A bonus that comes with this workflow improvement is that the edited state of each scene is now tracked through the undo system, which will reduce those strange cases where the scene was marked as edited when rearranging tabs or inspecting materials even though the scene was never touched.

这种工作流程改进带来的好处是,现在可以通过撤消系统跟踪每个场景的编辑状态,这将减少重新布置标签或检查材质时即使从未碰过场景也将场景标记为已编辑的奇怪情况。 。

NOTE: This feature is not shipping in Unity 5.0 but we are working on it for a later release

注意:Unity 5.0中没有提供此功能,但我们正在为以后的版本进行开发。

翻译自: https://blogs.unity3d.com/2014/08/04/multi-scene-editing/

ue4多人协作编辑场景