У нас вы можете посмотреть бесплатно RTS-Style Drag Select, Click to Select/Deselect, and Movement | AI Series Part 26 | Unity Tutorial или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Learn how to implement RTS-style drag selection, point and click selection, shift+click to select and deselect new units, and issue movement commands! This is sometimes also called "box selection". You'll also learn how to configure a SelectionManager singleton class that controls which units are currently selected, as well as automatically self-registering SelectableUnits. In AI Series Part 26 we'll be covering how to do all of the above RTS-style features and discussing the "gotchas" that are easy to run into when implementing the drag selection. We'll be using 2 key functionalities of the Camera class to achieve this: ⚫ Camera.ScreenPointToRay to do Raycasts from the Camera. ⚫ Camera.WorldToScreenPoint to determine which SelectableUnits are within our selection box. As usual with the AI Series, we're using the NavMesh Components: https://docs.unity3d.com/Manual/NavMe... not the built-in navigation system. 👨💻 As always, all code from this video is available on GitHub: https://github.com/llamacademy/ai-ser... 🏷️Save 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: https://www.jetbrains.com/store/?sect... 🧡 Believe in LlamAcademy's mission and have received value from the videos? Here's how you can show your support: 🌟 Patreon: / llamacademy 🌟 YouTube Member: / @llamacademy or click the Join button on any video 📚 Take my Unity ShaderGraph Course: https://www.gamedev.tv/p/unity-shader... 👕 Get yourself some LlamAcademy merch: https://llamacademy.myspreadshop.com/ 💸 Use my Affiliate Link for Humble Bundles https://humblebundleinc.sjv.io/9g4ak4 💸 Publisher Sale! 50% OFF an entire publisher's Assets! Publisher changes weekly! https://assetstore.unity.com/publishe... (affiliate) 💸 Save up to 50% on NEW Assets: https://assetstore.unity.com/?new_sal... (affiliate) Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase. Chapters: 00:00 Introduction 01:30 Scene Overview 02:30 SelectionManager.cs 04:09 SelectableUnit.cs - Auto-Registration and Show Selection 05:10 SelectionManager.cs - Trigger OnSelect and OnDeselect 05:43 PlayerInput.cs - Setup and Mouse States 07:26 PlayerInput.cs - Selection Box 10:30 Discuss Alternate Selection Options 11:10 PlayerInput.cs - UnitIsInSelectionBox 11:34 Adding Components and References 11:55 Selection Box Setup 12:52 Demo - Drag Selection 13:09 PlayerInput.cs - Adding Click Select/Deselect 15:25 Demo - Drag and Click Selection/Deselection 15:55 PlayerInput.cs - Send Movement Commands 16:50 Final Demo 17:38 Closing