KHO THƯ VIỆN 🔎

Ebook Learn unity for 2D game development: Part 2

➤  Gửi thông báo lỗi    ⚠️ Báo cáo tài liệu vi phạm

Loại tài liệu:     PDF
Số trang:         158 Trang
Tài liệu:           ✅  ĐÃ ĐƯỢC PHÊ DUYỆT
 













Nội dung chi tiết: Ebook Learn unity for 2D game development: Part 2

Ebook Learn unity for 2D game development: Part 2

UVs and AnimationThe previous chapter explained how to develop a GUI editor add-in that allows users to add selected textures in the project panel to

Ebook Learn unity for 2D game development: Part 2 a larger atlas texture. Atlas Textures help US improve the performance of our 2D games. In generating the atlas, we also saved meta-data. This includ

ed all filenames of textures inside the atlas, and their uv positions within the atlas. In closing that chapter, we tested the add-on functionality by Ebook Learn unity for 2D game development: Part 2

assigning an Atlas Texture to a procedural Quad Mesh in the scene, to see how it looked in the Viewport. The problem we faced was that the quad mesh

Ebook Learn unity for 2D game development: Part 2

rendered the complete atlas texture, rather than just a region of it (see Figure 7-1). The problem was not with the Atlas Texture, but with the mesh i

UVs and AnimationThe previous chapter explained how to develop a GUI editor add-in that allows users to add selected textures in the project panel to

Ebook Learn unity for 2D game development: Part 2 must be adjusted at the vertex level. That is. we must dig deeper into the mesh construction and edit its vertices. We’ll do that in this chapter, as

we create a new editor add-in to control mesh uv mapping. This add-on lets us select a textured quad in the scene and entirely customize its uv mappi Ebook Learn unity for 2D game development: Part 2

ng to show any region within the Atlas Texture (or within any texture!). In addition, we’ll also create another class to change uv mapping over time,

Ebook Learn unity for 2D game development: Part 2

creating a flipbook animation effect or an animated sprite effect.139140 CHAPTER 7: UVs and AnimationFigure 7-1. By default textured quads are generat

UVs and AnimationThe previous chapter explained how to develop a GUI editor add-in that allows users to add selected textures in the project panel to

Ebook Learn unity for 2D game development: Part 2 fix this, well need to edit the mesh uv mappingCreating a Dockable EditorSo far in this book we've built three editor add-ons (if you've been followi

ng every chapter): a Batch Rename tool, a Create Quad tool, and a Create Atlas Texture tool. Despite the enormous differences in behavior between thes Ebook Learn unity for 2D game development: Part 2

e tools, they still have an important characteristic in common relating to their usability and design. Specifically, a developer uses them all to run

Ebook Learn unity for 2D game development: Part 2

one-hit operations; that is, a “one click and you're done" paradigm. For example, to rename multiple objects, just select the objects in the scene and

UVs and AnimationThe previous chapter explained how to develop a GUI editor add-in that allows users to add selected textures in the project panel to

Ebook Learn unity for 2D game development: Part 2 well so far. But, the task that faces US now (editing mesh UVs) is different in this regard. Our scene may have potentially many different Quad Mesh

objects that must be edited (not just one or two), and we’ll want to perform those edits quickly and intuitively from the editor, without having to vi Ebook Learn unity for 2D game development: Part 2

sit the application menu, launching different Scriptablewizard windows one after the other. Instead, it would be great if we could have a non-modal an

Ebook Learn unity for 2D game development: Part 2

d dockable window, such as the Object Inspector, showing all relevant uv properties we can edit and have applied to the selected object (see Figure 7-

UVs and AnimationThe previous chapter explained how to develop a GUI editor add-in that allows users to add selected textures in the project panel to

Ebook Learn unity for 2D game development: Part 2ionV a.X 0f Potation1z -10X 0Y Scale0z 0XIYanz 1’ VCamera■ o.Clear FlagstBackground/Culling Mask b' fverythinq?«ProjectionPerspectiveIField of View Cl

ipping Planes ..60Near 0.3Far 1000I Normalized view Port PeetX 0Y 0w 1B HSBDepth-1Rendering PathVs'ePiaver Settings ’Target TextureHone (Render Tex Ebook Learn unity for 2D game development: Part 2

ture 1' W, ®HDR’ '■ ■/GUI Layer•9 0.■/ Flare Layer• o.® V Audio ListenerAdd ComponentFigure 7-2. The Object Inspector is an Editor window typically do

Ebook Learn unity for 2D game development: Part 2

cked in the interface. It offers intuitive property editing featuresSo let’s create an Editorwindow class for the uv editing feature. To do this, foll

UVs and AnimationThe previous chapter explained how to develop a GUI editor add-in that allows users to add selected textures in the project panel to

Ebook Learn unity for 2D game development: Part 2iptablewizard works fine for pop-up dialogs launched from the menu, but for more integrated behavior we need Editorwindow. Take a look at Listing 7-1

for our class skeleton. Figure 7-3 shows the project at this stage, configured and ready for coding.Listing 7-1. UVEdlt.cs Ebook Learn unity for 2D game development: Part 2

UVs and AnimationThe previous chapter explained how to develop a GUI editor add-in that allows users to add selected textures in the project panel to

Gọi ngay
Chat zalo
Facebook