No announcement yet.

BP - Creating permanent variables dynamically

  • Filter
  • Time
  • Show
Clear All
new posts

    BP - Creating permanent variables dynamically

    Hey guys,

    i am currently working on my Procedural Building Generator, therefore i save different parts of the Building in arrays. Now i want to be able to choose the meshes in the BP (static mesh, can be changed dynamically in the Blueprint) , than save them to an array, and reuse them.. This works, as long as i use the same blueprint or copy it over and over, however when i drag and drop from my content browser, everything is gone. So i basically want something like the little "+" symbol as a node in the BP, so i can save the meshes permanently in a new "static mesh array" - variable.

    Is there any possibility to achieve this ? I am not a coder btw (have some basics) , so if there is a c++ solution please guide me there because i really suck at it..

    Thanks in advance !

    For sucking at C++, there are great tuts on udemy website, also that Battery Collector one,

    Pure blueprint solution could be done with Function library , (pure) function. and one enumerator

    You set enumerator as list of style names you want.Then you make function that builds results depending on what style enum asks for. Yes a lot of selecting and filling up stuff.
    But good thing is that you will have all style defining data in single function. And later when you get better at C++ you can replace just that single function with real code and everything will work.

    When you have that function, you can make smaller functions that return single items depending on style. For eg function that takes style in and returns door mesh reference. Make tham pure and in blueprints you can use them like read only variables.


      Originally posted by TwentyEight28 View Post
      so i can save the meshes permanently in a new "static mesh array" - variable.
      Hardcode strings of 'actor' names and use 'Get All Actors of Class' on the strings when setting up the arrays.
      Or... Store the actor names in a CSV and load the names as a Datatable , and set-up the arrays that way etc.
      Having to use C++ for this feels overkill, but of course if you can endure it, then the engine will be open to you...
      What are the BEST Unreal Tutorials / Docs? There are none tbh... Here's why
      Instead its better to just take projects apart (see the free 'creators' listed here)


        Hey, thanks for the replies, but i think we misunderstood. See the pictures below. What i basically wanna achieve is the following:

        i created a ALLDESIGNstruct and a ONEDESIGNstruct.. in the ONEDESIGNstruct there are arrays predefined that hold the meshes. When i now add a new sONEDESIGNtruct to my ALLDESIGNstruct, everything works fine, but they are not like "hard-coded" into the ALLDESIGNstruct. I can only use them for this one BP Instance, but i want them to be there like forever (i basically dont want to change the instance of the struct but the reference file i created, know what i mean ?)