что такое blueprint в unreal engine 4

UnrealEd

Изучение Unreal Engine, документация на русском языке

Введение в Blueprints

Система Blueprints Visual Scripting в Unreal Engine – это полноценная система написания скриптов геймплея, в основу которой положена концепция использования интерфейса узлового типа, позволяющая создавать элементы геймплея прямо в Unreal-редакторе. Как и многие распространённые языки скриптования, он используется для определения объектно-ориентированные (OO) классы или объекты в движке. Если вы используете UE4, вы увидите, что объекты, использующие Blueprint, в народе называются просто «Blueprints».

Как работает Blueprints?

В своей базовой форме Blueprints виртуально скриптует дополнения к вашей игре. Сложные элементы геймплея создаются посредством связывания узлов, событий, функции и вариации в единую сеть.

Blueprints использует узловые сетки для реализации различных целей – конструирования объектов, единичных функций и общих событий геймплея, которые специфичны для каждого случая, создаваемого Blueprint — и внедрения нужного поведения и функциональности.

Часто использующиеся типы Blueprint

Самые распространенные типы Blueprint, с которыми вам придется работать – это Level Blueprints (уровни) и Blueprint Classes (классы).

Это всего два из всех доступных типов Blueprints, среди которых также есть Blueprint Macros (макросы) и Blueprint Interfaces (интерфейсы).

Level Blueprint

Level Blueprint играет ту же роль, что Kismet играл в Unreal Engine 3, и имеет те же возможности. Каждый уровень имеет свой собственный уровневый Blueprint, и он может управлять Актерами (Actors), контролировать все, что относится к фильмовой составляющей, используя Matinee Actors, и управлять вещами типа, стримов уровня, чекпоинтов и систем, связанных с уровнем. Level Blueprint также может взаимодействовать с Blueprint Classes, которые находятся внутри уровня, к примеру, читать/настраивать вариации или запускать кастомные события, которые те содержат.

Blueprint Class

Blueprint Classes идеальны для создания интерактивных ассетов, таких, как двери, выключатели, собираемые предметы и объекты разрушаемой среды. На картинке выше кнопка и набор дверей являются отдельными Blueprint, которые содержат необходимые скрипты, отвечающие, если игрок провоцирует определенные события, анимируя их, включая необходимые звуковые эффекты и изменяя их внешний вид (например, когда нажимают на кнопку, она начинает светиться).

В этом случае нажатие кнопки активирует событие внутри Blueprint, отвечающего за дверь, в результате чего она открывается. Но двери также можно с легкостью активировать с помощью другого типа Blueprint или с помощью Level Blueprint-последовательности. Благодаря самозаполняющейся природе Blueprints, их можно создать, просто набросав в уровни, и они будут прекрасно работать с минимумом настроек. Также это значит, что редактирование Blueprint, который используется в проекте, приведет к полному обновлению всех его структур.

Что еще умеет делать Blueprints?

Ниже приведены некоторые примеры того, как и для чего вы можете применить систему Blueprint.

Создание настраиваемых префабов (Prefabs) с помощью скриптов конструирования

В картах Content Examples длинные комнаты, которые содержат каждый пример (картинка сверху) – это отдельно взятый Blueprint, созданный из множества компонентов. Скрипт конструирования Blueprint создает и обслуживает различные Static Meshes (полигональные сетки) и подсветки, согласно параметрам, описанным в Blueprint’s Details panel (панель деталей). С помощью каждой созданной нами картой Content Example мы можете войти в демо-комнату Blueprint, установить значения, отвечающие за ее длину и высоту и количество комнат, которые можно сгенерировать (плюс некоторые другие опции), и в момент получить готовый набор комнат.

Первоначальное создание Blueprint, наподобие этого, может занять довольно много времени, но если вы знаете, что будете часто его использовать, то время, которое вы сэкономите на строительстве уровня и простоте внесения изменений, может нивелировать эту потерю.

Создание играбельного игрового персонажа

Pawns (пешки)- это еще один тип Blueprint Class, с помощью которого вы можете смиксовать вместе все необходимые элементы для создания играбельного персонажа в Blueprint-графе. Вы можете управлять поведение камеры, создавать вводимые события для мышки, контроллера и тач скринов, а также создавать Animation Blueprint- ассеты для управления скелетной сеткой анимации.

Когда вы начнете создавать нового Blueprint-персонажа, то столкнетесь с необходимостью добавления большого количества поведенческих компонентов, нужных для того, чтоб он мог передвигаться по территории, прыгать, плавать, падать, Для этого пригодятся вводимые события, координирующие то, как должен управляться персонаж.

Создание HUD

Скрипт Blueprint также может быть использован для создания игрового HUD, который похож на Blueprint Classes в том плане, что он может содержать событийные последовательности и вариации, но они не добавляются прямо к уровню, а применяются к ассету GameMode вашего проекта.

Вы можете установить HUD, чтоб читать вариации других Blueprints и использовать их для отражения шкалы здоровья, обновлять значение счета, отображать объектные маркеры и т.д. Также возможно использовать HUD для добавления зон поражения к таким элементам, как кнопки, которые можно кликнуть или в случае мобильных игр, получить реакцию на прикосновение к экрану.

Все примеры, описанные выше, существуют в контенте-образце, доступном в UE4, так что если вы хотите получше познакомиться с этими примерами, то их можно найти в Content Examples, в проектах First Person Shooter и Swing Ninja.

Blueprint Редакторы и графы

Разные типы Blueprint-редактора доступны в зависимости от типа Blueprint, над которым вы работаете. Корневая функция большинства Blueprint Editors – это Graph mode (режим графов), с центральным табом Graph, позволяющим разложить сеть вашего Blueprint.

Источник

UnrealEd

Изучение Unreal Engine, документация на русском языке

Blueprints: Как сделать.

Если вы практически не знакомы с Blueprints Visual Scripting в Unreal Engine 4, эти инструкции предоставят всю необходимую информацию, освещающую ключевые моменты работы по Blueprint’ам, включая создание Blueprint’ов, добавление и связываниt узлов, создание переменных и т.д. Поняв ключевые аспекты работы с Blueprint’ами, вы сможете продолжить изучать гайды, ориентированные на геймплей, которые находятся в Gameplay Guide и иллюстрируют элементы, родственные геймплею, например, спаунинг/уничтожение актеров, респаунинг, использование таймеров и многое другое.

Как связать Blueprints напрямую

На этой странице вы найдете информацию о том, как можно наладить прямую связь между двумя Blueprint’ами, чтоб передавать между ними информацию.

Для этого примера мы позволим игроку пройти сквозь площадку и активировать эффект частиц.

Здесь мы будем использовать шаблон Blueprint Third Person с включенным Starter Content.

Event Dispatchers (диспетчеры событий)

Когда мы вызываем Event Dispatcher, любой Blueprint, который выполняет и имеет привязку через Events к Диспетчеру событий, также выполняется при вызванном Event Dispatcher. Другими словами, когда бы мы не вызывали Диспетчер событий, любые события, которые привязаны к нему, также вызываются, позволяя выполнить множество Событий сразу и из одной точки.

Эта страница покажет вам, как установить Event Dispatcher и привязать к нему событие. В этом примере мы позволим игроку нажать клавишу, что задействует эффект горящего огня, заспаунинного внутри куста.

Мы будем использовать шаблон Blueprint Third Person с включенным Starter Content.

Ваши узлы соединены, и граф должен выглядеть, как показанный выше.
Кликаем Compile, закрываем Level Blueprint, а затем кликаем Play, чтоб проиграть результат в редакторе.

что такое blueprint в unreal engine 4. EventD 11. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-EventD 11. картинка что такое blueprint в unreal engine 4. картинка EventD 11.

Когда мы кликнем клавишу F, эффект пламени возникнет внутри куста

Использование интерфейсов

В этой инструкции мы установим Blueprint Interface, который приводит к выполнению разных скриптов в множестве Blueprint’ов при его вызове.

Мы будем использовать шаблон Blueprint First Person с включенным Starter Content.

Использование библиотеки макросов

Для этого примера мы используем Blueprint Third Person Project с включенным Starter Content.

Чтоб лучше видеть текст, который печатается на экране, рекомендуется смотреть видео, представленное выше в полноэкранном формате.

В видео выше мы включили скрипт Blueprint из шага 13, так что мы можем видеть его в действии. Когда мы нажимаем E в попытке вызвать макрос ScaleUp, мы сначала проверяем значение переменной Health, которое по умолчанию мы установили 0. Когда мы затем нажимаем Q, чтоб вызвать макрос AddHealth, чтоб увеличить переменную Health, каждый раз, когда мы нажимаем около 50. После нескольких нажатий, мы пробуем макрос ScaleUp опять, мы видим, что все получилось, потому что наше здоровье (Health) теперь перевалило за 100.

Эти макросы можно вызвать из любого другого Blueprints, которые предоставляют инпуты для Health, а Target Actor предоставляется.

Создание функций (Functions)

Функции – это узлы графа, принадлежащие определенному Blueprint, которые могут быть исполнены или вызваны из другого графа с помощью Blueprint. Функции имеют единичную точку выхода, созданную узлом с названием Function, содержащим главный выводной пин. Когда функция вызывается из другого графа, главный выходной пин активируется, приводя в действие связанную с ним сеть.

Шаги ниже покажут, как создать функцию, которая напечатает текст на экране, когда вы нажмете кнопку.

В этом примере функция только печатает текст на экране, когда вы нажимаете клавишу, но вы можете добавить функции, которая будет исполняться нажатием определенной клавиши, больше скрипта. Например, ваша функция может быть использована, чтоб наложить заклятие по нажатию клавиши. Кроме того, если ущерб наносится другому актеру, он может содержаться в функции, оставив ваш Event Graph свободным от всякого скрипта.

Создание макросов

В этом уроке мы создадим макрос, который будет проверять, есть ли у игрока достаточно энергии для прыжка или нет. Если у игрока достаточно энергии, то у него отберется немного энергии, а текущей уровень энергии напечатается на экране, после чего уже будет позволено прыгнуть. Если энергии мало, то на экране выведется, что энергии недостаточно и прыжок будет запрещен.

Для этого примера мы используем Blueprint Third Person Project с включенным Starter Content.

Когда мы нажимаем «пробел», чтоб прыгнуть в верхнем левом углу экрана значение переменной Energy напечатается на экране. Если уровень энергии будет равен 0, вы больше не сможете прыгать.

Это базовый пример использования макроса для исполнения скрипта и его консолидации в единичный узел, улучшая ридабилити нашего Event Graph и скрипта главного персонажа. Кроме того вы можете использовать этот макрос для других целей – скажем, для установки других условий уменьшения энергии игрока. Вы можете задействовать этот макрос для проверки того имеет ли игрок достаточно энергии для атаки после нажатии клавиши, отвечающей за атаку, а затем извлекать атаку из exec-пина HasEnergy.

Установка и получение отсылок к Actor

Установив базу для Actor, вы сможете получить доступ к его свойствам (Properties), переменным (Variables),событиям (Events) и функциям (Functions) (если применяются) во время геймплея через Blueprints или C++ и применить их для нужд своего геймплея. Скажем, например, вы хотите, чтоб свет загорался, когда ваш герой входит в Trigger Box, то отсылки к «свету» и Trigger Box позволят вам сделать это, привязав light Actor к событию OnComponentBeginOverlap, который относится к Trigger Box (в случае которого вы могли бы включить свет).

Установка правильных ссылок на актера (Actor) также важна для того, чтоб актеры могли нормально взаимодействовать. Если же вы ссылаетесь неправильно, что приведет к неверному взаимодействию и удручающим результатам. Проделайте шаги, приведенные ниже, чтоб получить пример настройки и получения ссылки на актера.

В этом примере мы используем новый шаблон Blueprint Third Person с включенным Starter Content.

When you enter the Trigger Box, your selected Actor should move up by 500 units. Each time you enter the Trigger Box, the box will move up by another 500 units. By establishing a reference, the variable knows which Actor to affect in the Trigger Box script. Try affecting a different Actor in the level using this script.

This time the new Actor selected should move up along the Z axis by 500 units each time you enter the Trigger Box. By using the Target Actor variable in our Box Trigger script, we are not locked into a specific Actor associated with the script and can modify it and change the Actor it affects without having to modify the Blueprint itself.

While this example illustrates how to move different objects around, instead of moving an object you could use this method to open doors when the player presses a button, turn on/off different lights, spawn items for the player to pick up or destroy or any number of other possibilities.

This is also one of multiple ways you can get reference to an Actor, for example if you wanted to get Reference to the Player Character which cannot be explicitly set via the Main Editor window, you would take a different approach (see the Related Links section below).

Создание Blueprint Classes (классов)

Создание классов помощью Content Browser

Blueprints хранятся в модулях, и могут быть созданы через Content Browser, как и любой другой ассет.

что такое blueprint в unreal engine 4. CreateBP mainFlow. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-CreateBP mainFlow. картинка что такое blueprint в unreal engine 4. картинка CreateBP mainFlow.

Создание правым кликом

Есть еще два метода, которые помогут вам создать Blueprint из Content Browser.

Расположение узлов

На этой странице вы научитесь располагать узлы на графе в Blueprints.

Drag-and-Drop (Перетаскивание)

Первый метод использует Drag-and-drop – процедуру, которая заключается в перетаскивании узлов из окна MyBlueprint в ваш граф. Например, ниже у нас несколько переменных, где мы перетаскиваем переменную внутрь и оставляем внутри графа, чтоб мы могли использовать ее в нашем графе.

что такое blueprint в unreal engine 4. AddingNodes1. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-AddingNodes1. картинка что такое blueprint в unreal engine 4. картинка AddingNodes1.

Зажимаем левую кнопку мыши и перетаскиваем переменную в окно графа (Graph window) и встречаемся с двумя опциями: Get и Set. Если мы выберем, Get создастся узел Getter, который примет переменную или значение, в то время как узел Setter позволит вам установить значение переменной. В зависимости от типа узла, могут быть случаи, когда будет доступна только опция Get.

что такое blueprint в unreal engine 4. AddingNodes2. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-AddingNodes2. картинка что такое blueprint в unreal engine 4. картинка AddingNodes2.

На картинке выше узел, который находится на верхушке, — это Getter, в то время как нижний узел – это Setter. Getter, например, можно использовать, как условие для элементов вашей игры. С другой стороны Setter, используя предыдущий пример, можно использовать для наращивания Player’s Health (здоровья игрока), так как вы говорите, что значение переменной Player Health должно устанавливаться посредством значения этой опции.

Таким же образом можно перетащить любые созданные ранее в вашем графе Functions (Функции) или Macros (Макросы).

что такое blueprint в unreal engine 4. AddingNodes7. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-AddingNodes7. картинка что такое blueprint в unreal engine 4. картинка AddingNodes7.

Также существуют контекстные действия, которые становятся доступны, когда мы перетаскиваем в Event Dispatcher, как проиллюстрировано ниже.

что такое blueprint в unreal engine 4. AddingNodes6. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-AddingNodes6. картинка что такое blueprint в unreal engine 4. картинка AddingNodes6.

Вы можете выбрать необходимое действие из контекстного меню, которое появляется, при перетаскивании в Event Dispatcher.

Поиск по контекстному меню

Как правило, располагая узлы, вы используете Context Menu, которое можно вызвать, выполнив правый клик внутри графа Blueprint.

что такое blueprint в unreal engine 4. RightClick1. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-RightClick1. картинка что такое blueprint в unreal engine 4. картинка RightClick1.

Воспользовавшись меню сверху, вы можете расширить любую категорию (или подкатегорию) и выбрать узел, который желаете добавить в граф.

Также в правом верхнем углу окна есть опция под названием Context Sensitive, которая активно по умолчанию, но может быть отключена, и она автоматически фильтрует опции, представленные в меню в текущем контексте.

что такое blueprint в unreal engine 4. RightClick2. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-RightClick2. картинка что такое blueprint в unreal engine 4. картинка RightClick2.

Как вы можете видеть ниже, когда мы, выполнив правый клик, ищем Animation с включенным Context Sensitive, нам выдается отфильтрованный список.

что такое blueprint в unreal engine 4. RightClick3. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-RightClick3. картинка что такое blueprint в unreal engine 4. картинка RightClick3.

Как бы то ни было, если вы отключите Context Sensitive, и будете искать в Animation теперь, вы увидите абсолютно все, что хоть как-то связано с анимацией.

что такое blueprint в unreal engine 4. RightClick4. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-RightClick4. картинка что такое blueprint в unreal engine 4. картинка RightClick4.

Итак, правый клик в графе включает Context Menu,но вы также можете оттащить существующий узел, чтоб опять же вызвать Context Menu.

что такое blueprint в unreal engine 4. RightClick5. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-RightClick5. картинка что такое blueprint в unreal engine 4. картинка RightClick5.

Выше мы сослались на компонент Character Movement и, перетаскивая с него пин, мы можем добавить узлы, которые имеют смысл в данном контексте и релевантны узлу, который мы стаскиваем, как видно в примере ниже.

что такое blueprint в unreal engine 4. RightClick6. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-RightClick6. картинка что такое blueprint в unreal engine 4. картинка RightClick6.

Выше мы можем указать значение максимальной скорости персонажа (Max Walk Speed), включив поиск по Set Max Walk, а затем выбрав Set Max Walk Speed из меню.

Горячие клавиши

Вы также можете использовать горячие клавиши (Keyboard Shortcuts) для более продуктивной работы с узлами.

Складываем графы

На этой странице мы опишем несколько способов того, как схлопнуть ваши Blueprint графы до простого узла в функции (Function) или в макросе (Macro), что поможет вам сделать крупные графы более компактными.

Схлопывание узлов

Самый простой метод схлопывания проиллюстрирован ниже, и он заключается в схлопывание узлов внутри графа. Прежде всего, он используется для лучшей организации и придания вашему событийному графу (Event Graph) более аккуратного вида.

Схлопывание до функции

Еще один метод, который можно использовать для схлопывания узлов, это схлопывание до функции (Function). Если сравнивать эти два метода схлопывания, то схлопывание до функции лучше не только потому, что можно вызвать функцию в другой области скрипта, базируясь на любых установленных вами параметрах, но и потому, что функцию можно вызвать внутри любого Blueprint (до тех пор пока есть ссылка на Blueprint, который содержит функцию, которую вы хотите вызвать).

Ниже перечислены шаги, которые нужно проделать, чтоб схлопнуть ваши узлы до функции.

Схлопывание до макроса (Macro)

Вы также можете использовать схлопывание узлов до макросов (Macro). Этот способ позволяет вам взять несколько связанных узлов и слить их в один. Он прекрасно подходит для всего того, что вы делаете часто, типа сложных математических расчетов.

Чтоб схлопнуть узлы в макрос:

Источник

Blueprint Class

These define a new class or type of Actor which can then be placed as instances that behave like any other type of Actor.

что такое blueprint в unreal engine 4. Unreal+Engine%2Fonlinelearning courses%2Fblueprints essential concepts%2FBPEssentialsThumbnail 1920x1080 1920x1080 2fcdde875f1d79ade1c295fe4fef53c4b8c5ecde. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-Unreal+Engine%2Fonlinelearning courses%2Fblueprints essential concepts%2FBPEssentialsThumbnail 1920x1080 1920x1080 2fcdde875f1d79ade1c295fe4fef53c4b8c5ecde. картинка что такое blueprint в unreal engine 4. картинка Unreal+Engine%2Fonlinelearning courses%2Fblueprints essential concepts%2FBPEssentialsThumbnail 1920x1080 1920x1080 2fcdde875f1d79ade1c295fe4fef53c4b8c5ecde.

что такое blueprint в unreal engine 4. Unreal+Engine%2Fonlinelearning courses%2Fblueprints essential concepts%2FBlueprint Essential Concepts 1000x1000 9f372ce55de42ce9596dffd6c931839e44fcc873. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-Unreal+Engine%2Fonlinelearning courses%2Fblueprints essential concepts%2FBlueprint Essential Concepts 1000x1000 9f372ce55de42ce9596dffd6c931839e44fcc873. картинка что такое blueprint в unreal engine 4. картинка Unreal+Engine%2Fonlinelearning courses%2Fblueprints essential concepts%2FBlueprint Essential Concepts 1000x1000 9f372ce55de42ce9596dffd6c931839e44fcc873.

что такое blueprint в unreal engine 4. Unreal+Engine%2Fonlinelearning courses%2Finteractive material swaps using blueprints%2F406 Hero2 1920x1080 ce26b6199cf620364149d2d934c73ae30e983110. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-Unreal+Engine%2Fonlinelearning courses%2Finteractive material swaps using blueprints%2F406 Hero2 1920x1080 ce26b6199cf620364149d2d934c73ae30e983110. картинка что такое blueprint в unreal engine 4. картинка Unreal+Engine%2Fonlinelearning courses%2Finteractive material swaps using blueprints%2F406 Hero2 1920x1080 ce26b6199cf620364149d2d934c73ae30e983110.

что такое blueprint в unreal engine 4. Unreal+Engine%2Fonlinelearning courses%2Finteractive material swaps using blueprints%2FInteractive Material Swaps Using Blueprints 1000x1000 21158a5fe67365e3bf5db49712b52482382f15ac. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-Unreal+Engine%2Fonlinelearning courses%2Finteractive material swaps using blueprints%2FInteractive Material Swaps Using Blueprints 1000x1000 21158a5fe67365e3bf5db49712b52482382f15ac. картинка что такое blueprint в unreal engine 4. картинка Unreal+Engine%2Fonlinelearning courses%2Finteractive material swaps using blueprints%2FInteractive Material Swaps Using Blueprints 1000x1000 21158a5fe67365e3bf5db49712b52482382f15ac.

что такое blueprint в unreal engine 4. Unreal+Engine%2Fonlinelearning courses%2Fblueprint for enterprise%2F301 Blueprints %281200X675%29 1200x675 d140b8a0b13b05c0619e35e1076b4c82e4a4b855. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-Unreal+Engine%2Fonlinelearning courses%2Fblueprint for enterprise%2F301 Blueprints %281200X675%29 1200x675 d140b8a0b13b05c0619e35e1076b4c82e4a4b855. картинка что такое blueprint в unreal engine 4. картинка Unreal+Engine%2Fonlinelearning courses%2Fblueprint for enterprise%2F301 Blueprints %281200X675%29 1200x675 d140b8a0b13b05c0619e35e1076b4c82e4a4b855.

что такое blueprint в unreal engine 4. Unreal+Engine%2Fonlinelearning courses%2Fblueprint for enterprise%2FBlueprint for Enterprise 1000x1000 13caa11b8e5c5e91506a8dd63b39d247318c3208. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-Unreal+Engine%2Fonlinelearning courses%2Fblueprint for enterprise%2FBlueprint for Enterprise 1000x1000 13caa11b8e5c5e91506a8dd63b39d247318c3208. картинка что такое blueprint в unreal engine 4. картинка Unreal+Engine%2Fonlinelearning courses%2Fblueprint for enterprise%2FBlueprint for Enterprise 1000x1000 13caa11b8e5c5e91506a8dd63b39d247318c3208.

A Blueprint Class, often shortened as Blueprint, is an asset that allows content creators to easily add functionality on top of existing gameplay classes. Blueprints are created inside of Unreal Editor visually, instead of by typing code, and saved as assets in a content package. These essentially define a new class or type of Actor which can then be placed into maps as instances that behave like any other type of Actor.

Parent Classes

There are several different types of Blueprints that you can create, however before doing so you will need to specify the Parent Class in which the Blueprint will be based. Selecting a Parent Class allows you to inherit properties from the Parent to use in the Blueprint you are creating.

Below are the most common Parent Classes used when creating a new Blueprint:

Actor

An Actor is an object that can be placed or spawned in the world.

Pawn

A Pawn is an Actor that can be «possessed» and receive input from a Controller.

Character

A Character is a Pawn that includes the ability to walk, run, jump, and more.

PlayerController

A Player Controller is an Actor responsible for controlling a Pawn used by the player.

Game Mode

A Game Mode defines the game being played, its rules, scoring, and other faces of the game type.

While the above are the most common, all existing classes can be used as the Parent Class for a new Blueprint (even other Blueprint Classes).

For example, say you created an Actor Blueprint called Animals and in it provided some script that all animals share such as Hunger, Thirst, Energy, or whatever script you wanted. Then you created another Blueprint called Dogs and selected your Animals Blueprint Class as the Parent Class; you can then provide specific functionality that applies to only dogs within the Dogs Blueprint such as Play Fetch or Roll Over while inheriting the functionality that all animals share from the Animals Blueprint.

Working with Blueprint Classes

Refer to the sections below for information on working with Blueprint Classes:

Источник

Blueprint Overview

The Blueprint Overview page breaks down the anatomy of a Blueprint and the different types of Blueprints available.

что такое blueprint в unreal engine 4. Unreal+Engine%2Fonlinelearning courses%2Fblueprints essential concepts%2FBPEssentialsThumbnail 1920x1080 1920x1080 2fcdde875f1d79ade1c295fe4fef53c4b8c5ecde. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-Unreal+Engine%2Fonlinelearning courses%2Fblueprints essential concepts%2FBPEssentialsThumbnail 1920x1080 1920x1080 2fcdde875f1d79ade1c295fe4fef53c4b8c5ecde. картинка что такое blueprint в unreal engine 4. картинка Unreal+Engine%2Fonlinelearning courses%2Fblueprints essential concepts%2FBPEssentialsThumbnail 1920x1080 1920x1080 2fcdde875f1d79ade1c295fe4fef53c4b8c5ecde.

что такое blueprint в unreal engine 4. Unreal+Engine%2Fonlinelearning courses%2Fblueprints essential concepts%2FBlueprint Essential Concepts 1000x1000 9f372ce55de42ce9596dffd6c931839e44fcc873. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-Unreal+Engine%2Fonlinelearning courses%2Fblueprints essential concepts%2FBlueprint Essential Concepts 1000x1000 9f372ce55de42ce9596dffd6c931839e44fcc873. картинка что такое blueprint в unreal engine 4. картинка Unreal+Engine%2Fonlinelearning courses%2Fblueprints essential concepts%2FBlueprint Essential Concepts 1000x1000 9f372ce55de42ce9596dffd6c931839e44fcc873.

что такое blueprint в unreal engine 4. Unreal+Engine%2Fonlinelearning courses%2Finteractive material swaps using blueprints%2F406 Hero2 1920x1080 ce26b6199cf620364149d2d934c73ae30e983110. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-Unreal+Engine%2Fonlinelearning courses%2Finteractive material swaps using blueprints%2F406 Hero2 1920x1080 ce26b6199cf620364149d2d934c73ae30e983110. картинка что такое blueprint в unreal engine 4. картинка Unreal+Engine%2Fonlinelearning courses%2Finteractive material swaps using blueprints%2F406 Hero2 1920x1080 ce26b6199cf620364149d2d934c73ae30e983110.

что такое blueprint в unreal engine 4. Unreal+Engine%2Fonlinelearning courses%2Finteractive material swaps using blueprints%2FInteractive Material Swaps Using Blueprints 1000x1000 21158a5fe67365e3bf5db49712b52482382f15ac. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-Unreal+Engine%2Fonlinelearning courses%2Finteractive material swaps using blueprints%2FInteractive Material Swaps Using Blueprints 1000x1000 21158a5fe67365e3bf5db49712b52482382f15ac. картинка что такое blueprint в unreal engine 4. картинка Unreal+Engine%2Fonlinelearning courses%2Finteractive material swaps using blueprints%2FInteractive Material Swaps Using Blueprints 1000x1000 21158a5fe67365e3bf5db49712b52482382f15ac.

что такое blueprint в unreal engine 4. Unreal+Engine%2Fonlinelearning courses%2Fblueprint for enterprise%2F301 Blueprints %281200X675%29 1200x675 d140b8a0b13b05c0619e35e1076b4c82e4a4b855. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-Unreal+Engine%2Fonlinelearning courses%2Fblueprint for enterprise%2F301 Blueprints %281200X675%29 1200x675 d140b8a0b13b05c0619e35e1076b4c82e4a4b855. картинка что такое blueprint в unreal engine 4. картинка Unreal+Engine%2Fonlinelearning courses%2Fblueprint for enterprise%2F301 Blueprints %281200X675%29 1200x675 d140b8a0b13b05c0619e35e1076b4c82e4a4b855.

что такое blueprint в unreal engine 4. Unreal+Engine%2Fonlinelearning courses%2Fblueprint for enterprise%2FBlueprint for Enterprise 1000x1000 13caa11b8e5c5e91506a8dd63b39d247318c3208. что такое blueprint в unreal engine 4 фото. что такое blueprint в unreal engine 4-Unreal+Engine%2Fonlinelearning courses%2Fblueprint for enterprise%2FBlueprint for Enterprise 1000x1000 13caa11b8e5c5e91506a8dd63b39d247318c3208. картинка что такое blueprint в unreal engine 4. картинка Unreal+Engine%2Fonlinelearning courses%2Fblueprint for enterprise%2FBlueprint for Enterprise 1000x1000 13caa11b8e5c5e91506a8dd63b39d247318c3208.

The Blueprints Visual Scripting system in Unreal Engine is a complete gameplay scripting system based on the concept of using a node-based interface to create gameplay elements from within Unreal Editor. As with many common scripting languages, it is used to define object-oriented (OO) classes or objects in the engine. As you use UE4, you’ll often find that objects defined using Blueprint are colloquially referred to as just «Blueprints.»

This system is extremely flexible and powerful as it provides the ability for designers to use virtually the full range of concepts and tools generally only available to programmers. In addition, Blueprint-specific markup available in Unreal Engine’s C++ implementation enables programmers to create baseline systems that can be extended by designers.

Does that mean Blueprints are a replacement for UnrealScript? Yes and no. Gameplay programming and everything that UnrealScript was used for in the past can still be handled through code using C++. At the same time, while Blueprints are not meant as a replacement for UnrealScript, they do serve many of the same purposes that UnrealScript handled, such as:

Storing and modifying default properties

Managing subobject (e.g. Components) instancing for classes

The expectation is that gameplay programmers will set up base classes which expose a useful set of functions and properties that Blueprints made from those base classes can use and extend upon.

The table below provides a comparison of how various aspects would be handled in UnrealScript (from Unreal Engine 3), C++, and Blueprints to help those transitioning from previous versions of the engine as well as show how native code and Blueprints compare.

Types of Blueprints

Blueprints can be one of several types that each have their own specific use from creating new types to scripting level events to defining interfaces or macros to be used by other Blueprints.

Blueprint Class

A Blueprint Class, often shortened as Blueprint, is an asset that allows content creators to easily add functionality on top of existing gameplay classes. Blueprints are created inside of Unreal Editor visually, instead of by typing code, and saved as assets in a content package. These essentially define a new class or type of Actor which can then be placed into maps as instances that behave like any other type of Actor.

Data-Only Blueprint

A Data-Only Blueprint is a Blueprint Class that contains only the code (in the form of node graphs), variables, and components inherited from its parent. These allow those inherited properties to be tweaked and modified, but no new elements can be added. These are essentially a replacement for archetypes and can be used to allow designers to tweak properties or set items with variations.

Data-Only Blueprint are edited in a compact property editor, but can also be «converted» to full Blueprints by simply adding code, variables, or components using the full Blueprint Editor.

Level Blueprint

A Level Blueprint is a specialized type of Blueprint that acts as a level-wide global event graph. Each level in your project has its own Level Blueprint created by default that can be edited within the Unreal Editor, however new Level Blueprints cannot be created through the editor interface.

Events pertaining to the level as a whole, or specific instances of Actors within the level, are used to fire off sequences of actions in the form of Function Calls or Flow Control operations. Those familiar with Unreal Engine 3 should be very familiar with this concept as this is very similar to how Kismet worked in Unreal Engine 3.

Level Blueprints also provide a control mechanism for level streaming and Sequencer as well as for binding events to Actors placed within the level.

Blueprint Interface

Blueprint Interfaces can be made by content creators through the editor in a similar fashion to other Blueprints, but they come with certain limitations in that they cannot:

Blueprint Macro Library

A Blueprint Macro Library is a container that holds a collection of Macros or self-contained graphs that can be placed as nodes in other Blueprints. These can be time-savers as they can store commonly used sequences of nodes complete with inputs and outputs for both execution and data transfer.

Macros are shared among all graphs that reference them, but they are auto-expanded into graphs as if they were a collapsed node during compiling. This means that Blueprint Macro Libraries do not need to be compiled. However, changes to a Macro are only reflected in graphs that reference that Macro when the Blueprint containing those graphs is recompiled.

Blueprint Utilities

A Blueprint Utility (or Blutility for short), is an editor-only Blueprint that can be used to perform editor actions or extend editor functionality. These can expose Events with no parameters as buttons in the UI and have the ability to execute any functions exposed to Blueprints and act on the current set of selected Actors in the viewport.

Blueprint Anatomy

The functionality of Blueprints is defined using various elements; some of which are present by default, while others can be added on an as-needed basis. These provide the ability to define Components, perform initialization and setup operations, respond to events, organize and modularize operations, define properties, and more.

Components Window

With an understanding of Components, the Components window inside the Blueprint Editor allows you to add Components to your Blueprint. This provides a means of adding collision geometry via CapsuleComponents, BoxComponents, or SphereComponents, adding rendered geometry in the form of StaticMeshComponents or SkeletalMeshComponents, controlling movement using MovementComponents, etc. The Components added in the Components list can also be assigned to instance variables providing access to them in the graphs of this or other Blueprints.

Construction Script

The Construction Script runs following the Components list when an instance of a Blueprint Class is created. It contains a node graph that is executed allowing the Blueprint Class instance to perform initialization operations. This can be extremely powerful as actions like performing traces into the world, setting meshes and materials, and so on can be used to achieve context-specific setup. For instance, a light Blueprint could determine what type of ground it is placed upon and choose the correct mesh to use from a set of meshes or a fence Blueprint could perform traces extending out in each direction to determine how long of a fence is needed to span the distance.

Event Graph

The EventGraph of a Blueprint contains a node graph that uses events and function calls to perform actions in response to gameplay events associated with the Blueprint. This is used to add functionality that is common to all instances of a Blueprint. This is where interactivity and dynamic responses are setup. For example, a light Blueprint could respond to a damage event by turning off its LightComponent and changing the material used by its mesh. This would automatically provide this behavior to all instances of the light Blueprint.

Functions

Functions are node graphs belonging to a particular Blueprint that can be executed, or called, from another graph within the Blueprint. Functions have a single entry point designated by a node with the name of the Function containing a single exec output pin. When the Function is called from another graph, the output exec pin is activated causing the connected network to execute.

Variables

Variables are properties that hold a value or reference an Object or Actor in the world. These properties can be accessible internally to the Blueprint containing them, or they can be made accessible externally so that their values can be modified by designers working with instances of the Blueprint placed in a level.

Blueprint Modes

A Blueprint’s mode determines what is visible in its window. Although Level Blueprints contain only one mode, the Graph mode, Blueprint Classes contain three different modes:

For more information, please see the Blueprint Class Modes documentation.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *