top of page
  • Linekdin
  • Github
  • Itch.io
  • Youtube
  • Artstation

UE C++ Concepts

Rahul Chandra

UE Game Framework
  1. UObject

    1. Parent class for all other classes in UE

    2. Cannot be placed in the scene

  2. Actor Class

    1. Child of UObject

    2. Can be spawned or placed in a level

    3. Can be extended to any class that needs to be spawned or placed(eg : Pickups)

  3. Pawn Class

    1. Child of Actor

    2. Can receive input from Input Sources

    3. Has a basic pawn movement components class(not advanced like character class)

    4. Used for very basic AI and Custom classes that require Input.

  4. Character Class

    1. Child of Pawn

    2. Has an advanced Character Movement Component with functionality like movement speed, flying etc.

  5. Actor Component Class

    1. Child of UObject

    2. Can be attached to any actor

    3. Supports Replication

    4. Ideal for encapsulating reusable logic in one place(like Inventory System or health component)

  6. Game Mode Class

    1. Child of Actor

    2. Keeps track of current game/match state

    3. Similar to Game Manager in Unity

    4. Supports Replication

  7. Player Controller Class

    1. Child of Actor

    2. Keeps tracks of player input

    3. Supports Replication and helps identify the player in networked games



UPROPERTY() macro
  1. UPROPERTY() is a macro that helps connects variables from C++ to Blueprint.

  2. It ties variable or component with the Unreal Reflection System

  3. Allows the variable to be garbage collected when Unreal's own garbage collection system runs.

    1. EditAnywhere, EditDefaultsOnly, EditInstanceOnly

      1. EditAnywhere: The property can be edited anywhere, including in the Blueprint’s default and instance properties.

      2. EditDefaultsOnly: The property can only be edited in the Blueprint’s defaults details panel, not at runtime.

      3. EditInstanceOnly: The property can only be edited when an instance of the Blueprint is placed in the level.

    2. BlueprintReadWrite, BlueprintReadOnly

      1. BlueprintReadWrite: The property is readable and writable in Blueprints, meaning you can get and set its value.

      2. BlueprintReadOnly: The property is readable in Blueprints but cannot be modified.

    3. VisibleAnywhere, VisibleDefaultsOnly, VisibleInstanceOnly

      1. VisibleAnywhere: The property is visible in the editor but not editable.

      2. VisibleDefaultsOnly: The property is visible in the Blueprint’s default properties but not editable in instances.

      3. VisibleInstanceOnly: The property is only visible when the instance of the Blueprint is placed in the level.



UFUNCTION() macro
  1. Macro that helps connect C++ to Blueprints

  2. Allows and is required for functions to be bound existing delegate events in unreal.

    1. BlueprintPure : Creates a blueprint node that doesn't require an input to run code and is implemented in C++(figure 1)

    2. BlueprintCallable : Creates a blueprint node that require an input to run code and is implemented in C++(figure 2 : Red)

    3. BlueprintImplementableEvent : Creates an event node that requires an input to run and code is implemented in blueprints(Figure 3 : Blue)

Comments


  • Linekdin
  • Github
  • Artstation
  • Itch.io
  • Youtube

 © 2024 Rahul Chandra 

bottom of page