Skip to content

Latest commit

 

History

History
163 lines (127 loc) · 10.2 KB

File metadata and controls

163 lines (127 loc) · 10.2 KB

Took some notes from what I learned in the tutorial

Viewport

  • Shortcuts:
    • You can hit G to switch to Game View
    • QWERT for Tools (e.g. rotation, move, scale, etc.)

Landscape:

  • You can hold shift while using tools (like sculpt) to inverse them.
    • For example, you don't sculpt a hill but a hole.
  • You can hit 'end' on your keyboard to snap items to the ground (landscape) in the level.

Blueprints

  • There are level blueprints

  • If you select an object in the level, then go to level blueprint and right click on empty space in event graph, you can add reference to that object.

  • Shortcuts:

    • Hold D and press LMB -> Creates Delay node
    • Hold ALT and press LMB on Exec arrow (the white little shit where you drag spaghetti - or how to call it) -> Deletes spaghetti that is connecting two blocks.
    • Hold CTRL and drag Variable into the event graph to automatically GET the vector.
    • Click on blueprint box, and hit CTRL + D, you can duplicate it.
    • Hold D and click LMB to add a delay in blueprint.
    • Hold B and click LMB to add if (branch) statement.
  • That dots are called 'pins'. Atleast hey call them 'pins'

  • That 'little white shit' is called an execution pin.

  • If you double click on node, it will create a separate pin. It is called 'reroute node'

  • You can add 'Sequence' to split 1 execution pins into more.

  • Get Actor Location is a function, but it does not have execution pin. Then it is called a 'pure function'

  • Event Tick is a function

    • It is called every frame
  • Blueprint is based on C++

  • Using spaces in names of functions, variables, etc. is not a good practice and can often lead to problems. Use 'Pascal Case' (example: MyVariableName -> each word starts with uppercase).

  • Difference between Print String & Print Text

    • Print String: For debugging. Shows messages in the editor (top-left screen) and output log. Uses colored plain text.
    • Print Text: Same purpose, but supports rich text formatting, localization, and better performance in packaged builds. Preferred for production or multi-language.
    • Use Print String when debugging. Use Print Text when formatting, translating, or shipping.
  • Variable Types (I already know most of the basic ones, but its better to write them down):

    • Boolean: True / False
      • You can use select for boolean in event graph.
    • Byte: Unsigned 8-bit integer
    • Integer: Whole number
    • Integer64: Whole number but for 64bit architecture, meaning it can be larger
    • Float: A decimal number
    • String Types:
      • Name: Used in tags
      • String: It's a String, in most cases we will use this.
      • Text: Text is mostly used for UI & HUD
    • Vector: Vector is a struct with 3 values: X, Y, Z.
    • Rotator: Simmilar to Vector, but there is a limitation from values of 0 to 360. Beyond that, rotator is going to be invalid.
    • Transform: Transform is a struct, which contains Vector, Rotator, Vector (Location, Rotation and Scale)
    • Other:
      • Types: Structure, Interface, Object Types, Enum (Enumeration)
      • Most common: Hit Result, Actor,
  • Structs:

    • You can create a 'struct' (content browser -> new -> blueprints -> structure), then create some variables. Then go to blueprint event graph -> right click -> add -> 'name of structure' -> Options: Break, Make, Set...
    • Struct (name of the structure) can also be a type of variable.
    • If we drag&drop the variable (which has a struct type) and choose 'get', we can right click on the blue pin and decide to 'Split Struct pin'.
    • It's basically a variable which stores multiple variables in it
    • Removing an existing variable from struct can cause issues in blueprints.
    • You can have array of structs
  • Enums:

    • You can create 'enum' (content browser -> new -> blueprints -> enumeration).
    • Enumerator is a number between 0 and 256
    • Enum (name of the enumeration) can also be a type of variable.
      • After you assign a enum as a type of variable, you can set Default value of the enum in the variable details (in blueprint).
    • You can assign Get "VariableName" to print string (if it's enum).
    • If you drag&drop the variable (which has an enum type) and choose 'get', you can drag a node out of it to create Switch on "EnumName" where you can drag more nodes out of it based on enumerations names in your enum.
  • Functions:

    • Function is basically a block of code which adds functionality to your program.
    • You can add input/output parameters for a function in its details panel
    • You can create something called 'Local Variables' in functions.
    • You can not add a delay node in functions.
    • Can be called from other blueprints. (can be disabled by setting access specifier to private)
  • Macros:

    • You can not add a delay node in functions. That's why we use macros
    • Can not be called from other blueprints.
  • Collapsed Graph

    • Notes are in Content/Blueprints/BP_CollapsedGraph
  • Branching

    • There was just a branch :(
    • BUT, You can use select for boolean in event graph :)
  • While Loop

    • Condition: (as long as its true, Loop Body will be executed)
    • Loop Body: Content to loop
    • Completed: What to do if loop is complete and condition is false
    • Note: avoid using loops with larger data sets (>100) and use c++ instead. Why? C++ is faster than blueprint
  • Functions

    • Functions can either be Pure or Impure. The main difference is that Pure Functions promise not to modify state or the members of the class in any way, while Impure Functions are free to modify state. Pure Functions are generally used for getter Functions or operators that just output a data value.
  • Game Instance

    • Created by going to explorer > blueprints > more > game instance
    • What this does is that it is referrign to the whole game application
    • Event init -> game start
  • Timers

    • We have a lot of options here (set timer by event, set timer by function, etc)
      • However, set timer by event is pointless (as the guy in tutorial said), because you can actually refer to the event by using the function itself so, most of the time you will be using set timer by function name.
    • Difference between delay and timer is that timer is going to be very precise (usually up to micro or even nano seconds)
  • Its way better (and recommended) to use interfaces instead of casting for saving resources. But in the first parts of tutorial we are doing casting because of its simplicity

  • Expose on spawn and instance editable -> these allow us to edit the properties when spawning the actor (set these 2 on HealthPoints in BP_Pickup)

    • Now when we use SpawnActor in blueprints, we can now edit the HealthPoints value directly in the SpawnActor node
  • Target Point -> https://dev.epicgames.com/documentation/en-us/unreal-engine/target-point-actors-in-unreal-engine

  • Components are objects so you can just get them as variables

  • Raycasting

    • we'll mostly use Line Trace By Channel
      • Line trace by channel is basically a function which lets us draw a line from a given starting point to a given ending point, and in between these 2 points, if it hits anything, we are going to get a hit result ()
    • trace channel option -> you can use it to ignore certain objects
  • When converting some input variable types to another, we get options to change to Float single precision or double precision. Now what do these mean? The difference between converting to float single precision and converting to float double precision in UE5. 2 Blueprint is that the former converts a 32-bit number to a 32-bit floating point number, while the latter converts a 32-bit number to a 64-bit floating point number.

  • if you go to details of selected object in blueprint viewport, you can change the collision presets

    • this is useful for example in line tracing (raycasting)
  • Unreal uses centimeters as primary

  • We should use get player camera manager if there are multiple cameras in our player

  • In widget blueprint designer view, we have an option to change resolution. There are two most used options: fill screen and custom.

    • custom is mostly used when you have stuff like dropdown and youre making a child widget or something
  • you can use console command nodes in blueprints. just type console command

  • blueprint function library

    • let's say you wanted to have some functions which might be used in multiple places but are not relative to a certain object so in that case you would use a blueprint function Library

Misc

  • Anything that can be placed in a level is called an 'Actor'

  • Light Movability:

    • Types can be changed in Transform section in the details panel
    • Types of Light Movability:
      • Static: Can't be changed in-game
      • Stationary: Can only change color and intensity in-game, but cant move
      • Movable: Can be moved and changed in-game
  • 'vice versa' means 'the other way around' in english

  • all 3D models which you get in the engine without any sort of animations or anything those will generally be static meshes uh any mesh with some sort of animation is going to be a skeletal mesh basically so stuff like characters gun models and those are going to be your skeletal meshes anything which simulate physics or which does not have animations so for example the staircase maybe a weapon model in a pickup blueprint stuff like that are going to be static meshes so they're recognized by a light blue color in the content browser so if I head into models you see it has a light blue color coding and this indicates that it's a static

  • plugins

    • let's say we have a plugin which you install to the engine but you actually don't have the appropriate version, so the way you actually go about upgrading your version is actually really simple
      • you just come into your uh Unreal Engine installation directory then engine plugins and the marketplace ones will be in the marketplace folder and for example I can right click on this up plugin file and I can actually open it with any text editor, then inside the up plugin file you should see the engine version let's say it was there for 4.27 and you're using five and if you want to make it compatible and let's say you're getting build errors you could just go ahead and change 4.27 to 5.0.0
  • cc0 textures (also known as ambienttextures)


using the LE Extended Standard Lib