【更新】Transition Blocks 1.6
Transition Blocks is an easy to use, and beautiful way to transition between scenes in your game. At its simplest all you need to do is drag a prefab into your first scene and call: Transitioner.Instance.TransitionToScene("SceneName");
Its power comes from the options you have to customize each transition. Transitions are made out of two basic parts: the transition block and the transition order. The transition block has an animation that tells it how to animate itself once it's placed and the transition order decides how to place the transition blocks over a time period you specify. If you have the PlayMaker asset then you'll get actions under the "level" category to change levels. (This asset does not require PlayMaker)
Transition Blocks automatically handles the following for you:
- Sizing the transition based on your screen resolution
- Placing the transition on your main camera in a way that works for both perspective and orthographic cameras
- Following your camera's position and rotation
- Resizing if you change the orthographic camera size
- Setting the sprites to the very front sorting layer and highest sorting order so they cover everything during a transition
Things to consider: This asset will only work on one camera at a time so if you have split screen multiplayer it won't work. Each block is also its own game object. If you're using a screen space overlay canvas the blocks will not be able to render above your UI. This does work fine with screen space camera though!
过渡块(Transition Blocks)是一种简单易用、美观大方的游戏场景过渡方式。最简单的方法就是将预制块拖入第一个场景,然后调用 Transitioner.Instance.TransitionToScene("SceneName");
它的威力来自于你可以自定义每个过渡的选项。转场由两个基本部分组成:转场块和转场顺序。过渡块有一个动画,告诉它在放置后如何进行动画,而过渡顺序则决定在你指定的时间段内如何放置过渡块。如果您拥有 PlayMaker 资产,那么您将在 "关卡 "类别下获得更改关卡的操作。(该资产不需要 PlayMaker)
过渡块会自动为你处理以下事项:
- 根据屏幕分辨率调整过渡的大小
- 以同时适用于透视和正视摄像机的方式将过渡块放置在主摄像机上
- 跟随摄像机的位置和旋转
- 在改变正摄影机尺寸时调整大小
- 将精灵设置为最前的排序层和最高的排序顺序,以便在过渡期间覆盖所有内容
注意事项 该资产一次只能在一个摄像头上运行,因此如果您使用分屏多人游戏,它将无法运行。每个区块也是自己的游戏对象。如果您使用的是屏幕空间覆盖画布,区块将无法在用户界面上方呈现。在使用屏幕空间摄像头时可以正常工作
页:
[1]