How to randomize static meshes on actor construction script UE5 tutorial for beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ต.ค. 2024
  • In this video, I will guide you through the process of creating an actor in Unreal Engine 5 that will spawn with a randomly chosen static mesh at runtime. I will demonstrate how to set up the actor construction script and the necessary code snippets to implement the randomization. I will also provide tips and best practices for optimizing performance and achieving a polished final product. Whether you're a beginner or have some experience with UE5, this tutorial will give you the knowledge you need to add dynamic, randomized elements to your projects
    If you liked leave a like
    if you want to support me you can do it on Patreon
    / indiegamedevnikgames
    or you can buy me a cup of coffe
    www.buymeacoff...
    Join to my Discord
    / discord

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

  • @theodorvepper
    @theodorvepper 9 หลายเดือนก่อน

    What if I don't want the branch to change every time I move the actor in the level? I can imagine I can save the index. But what if I want to spawn an actor instead? and that actor has it's own actors to spawn? Is there a way to persist?

    • @nikgamesgamedev
      @nikgamesgamedev  9 หลายเดือนก่อน

      Yes you can save an index only. You can make exactly as in this video just don't create an randomizing function in construct function. In construct function you can setup static mesh by fixed index. And then it's will not change meshes. But you can create an other function that you will call for changing meshes from array.