SUBSYSTEMS for Unreal Engine in C++ in 5 Minutes!

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ม.ค. 2025

ความคิดเห็น • 12

  • @sqw33k
    @sqw33k 5 หลายเดือนก่อน +2

    Great content! I'm so glad I've found your channel! One question though:
    I have a C++ class inheriting from UWorldSubsystem and it has UCLASS(Blueprintable).
    In the editor, I've created a blueprint with this as the parent. It all works!
    ...
    except when I try to have a function in the C++ class with UFUNCTION(BlueprintImplementableEvent). I CAN get the event into the BP event graph and connect a simple Print to it but it does not fire when the function is called. Any ideas?

    • @PobatoTutorials
      @PobatoTutorials  5 หลายเดือนก่อน +1

      I tried to replicate the issue.
      Have you overridden the ShouldCreateSubsystem function, like this:
      bool UMyWorldSubsystem::ShouldCreateSubsystem(UObject* Outer) const
      {
      return Super::ShouldCreateSubsystem(Outer) && GetClass()->IsInBlueprint();
      }
      If you try to grab the Substystem with GetWorld()->GetSubsystem() it will per default grab the c++ version of the subsystem (which doesn't have the function implemented).
      With the code above you ensure that only an instance of the blueprint version will be created.
      Let me know if it works after adding this code!
      Otherwise, you can also hop on the Discord-Server!

    • @sqw33k
      @sqw33k 5 หลายเดือนก่อน +1

      @@PobatoTutorials Omg, how could I have missed that? It's literally in the video! THANK YOU SO MUCH FOR REPLYING! It works now! :D
      You sir, have earned yourself a subscriber. Thank you again! :D:D

    • @PobatoTutorials
      @PobatoTutorials  5 หลายเดือนก่อน

      @@sqw33k Glad that it works now and thanks for subscribing! If you stumble across other problems don't hesitate to reach out!

  • @theprimmgroup
    @theprimmgroup หลายเดือนก่อน +1

    Love your content so far. Great explanations of systems in tangible ways.
    Subsystems can mimic the behavior of the "Singleton" pattern in programming in general. I've seen this been more of the use case in practice and is a need to discover the Subsystem pattern in Unreal.
    The Singleton pattern can become very helpful with other subsystem types (compared to the GameInstanceSubsystem focused on the video), so it can become uniquely useful when making changes to the Editor or Engine.

  • @Yui.Hirasawa.
    @Yui.Hirasawa. 2 หลายเดือนก่อน +1

    thank you for the tutorial

  • @rolffsonsIBM1401channel
    @rolffsonsIBM1401channel 6 หลายเดือนก่อน +1

    Short and to the point, love it
    1:29 Initialize
    2:15 get reference to subsystem
    2:41 add own BP callable function
    2:53 access parameters from BP
    3:44 ensure subsystem is loaded
    4:17 intialize only once
    4:44 check if in derived BP class

    • @PobatoTutorials
      @PobatoTutorials  6 หลายเดือนก่อน

      Glad you liked it! Is there any topic that you are interested in?

  • @dekkobokko
    @dekkobokko 5 หลายเดือนก่อน +1

    This was VERY useful. Thank you so much. I was feeling defeated not being able to fire events in my BP subsystem, this gave me the precious info to get it working!

    • @PobatoTutorials
      @PobatoTutorials  5 หลายเดือนก่อน

      Nice to hear that it was helpful!
      And yeah if you use subsystems together with BP you have to keep a few things in mind.

  • @VHShark
    @VHShark 13 วันที่ผ่านมา

    Hi I have my BLueprint based Subsystem and did the ShouldCreateSubsystem override as you said. It works perfectly when I'm using it in the Actor but once I use my SUbsystem in the UObject, it shows me the error that Context Pin must have connection, but there is no Pin to connect in the node GetYourNameSubsystem.
    I tried to workaround that and add a bluerping function library in c++ which takes in a context and returns the subsystem, but now It cant find it in c++ and returns nullptr since it cant find the blueprint one

  • @VonchkynProduction
    @VonchkynProduction 6 หลายเดือนก่อน +2

    👍👍👍👍👍