Unreal Engine 4 Tutorials: C++ UPROPERTY Visibility/Edit specifiers

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ต.ค. 2024

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

  • @stephenmaloney424
    @stephenmaloney424  3 ปีที่แล้ว +2

    I made a second video about EditFixedSize; I made a mistake here in not checking if the arrays were already initialized. If you do things this way, the data will be thrown away. Be sure to check that your arrays are sized to 0 before calling init on them.

  • @gamechop3884
    @gamechop3884 ปีที่แล้ว

    Hello,
    Why your
    Uproperty
    Uscenecomponent variable
    is not showing near that float. I want something like my new class (forward declaration) to visible in detail panel. But its not showing up there untill I press play button. In play mode its showing but its not showing rest of the time!!!

    • @stephenmaloney424
      @stephenmaloney424  ปีที่แล้ว

      The one above the float, where I use UPROPERTY(EditInstanceOnly) tells the editor that you only want to be able to edit it during runtime. If you want to see a scene component always, use UPROPERTY(VisibleAnywhere) and be sure to construct it in the constructor of the cpp file.

    • @gamechop3884
      @gamechop3884 ปีที่แล้ว

      @@stephenmaloney424 hello, thanks for reply.
      I actually want to set that Scene component variable through class defaults. How to make it possible?

    • @stephenmaloney424
      @stephenmaloney424  ปีที่แล้ว

      Typically you set the scene component up by creating it in the cpp file in the constructor. You might need to explain what you are trying to do exactly - the way Unreal is set up, you may be trying to do something in a way that isn't possible, but if you know the right way is easy.

    • @gamechop3884
      @gamechop3884 ปีที่แล้ว

      @@stephenmaloney424 ok, I found that it's impossible in unreal because the the way it's setup is far different from what I am being using from long time (unity).

    • @stephenmaloney424
      @stephenmaloney424  ปีที่แล้ว

      @@gamechop3884 Oh, that makes more sense. I'd look up some videos for Unity->Unreal to help you, but the first thing to keep in mind is that Unreal started as a first person multiplayer shooter, so everything was designed with that in mind. It will take some time for it to start to make sense to you but it will click if you keep experimenting for a bit! Good luck.