Announcement

Collapse
No announcement yet.

Assign variable outside of Blueprint

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Assign variable outside of Blueprint

    I'm not sure how to ask this, but I'm sure there's an easy way to do it.
    Essentially, this can have many uses in my development, but this is just one specific example.

    What I'm trying to achieve
    I want to be able to create 1 Blueprint, and after I place it in the world, I want to give it unique settings.
    For example, I want to have a box that contains a mesh inside it, like an apple or an orange.

    After I place it in the world, I want to select the individual actor and choose apple or orange.
    Ideally, I'd like to have both of the meshes(apple, orange) within the default scene tree in the Blueprint.
    So when apple is selected, the apple will appear to that specific actor, vice versa with orange.
    I know I could just create 2 Blueprints, one with apple, and one with an orange, but I really want to just have 1 Blueprint.

    Can anyone please shed some light on how this can be done? I'm pretty sure it's just somehow creating additional parameters and a little bit of logic.

    Thanks!

    #2
    Here is a simple way to do it using an enum to switch between static meshes :

    Click image for larger version

Name:	test302.PNG
Views:	1
Size:	114.5 KB
ID:	1128194

    Click image for larger version

Name:	test303.PNG
Views:	1
Size:	41.2 KB
ID:	1128195

    Click image for larger version

Name:	test304.PNG
Views:	1
Size:	252.7 KB
ID:	1128196
    Website [ LINK ]
    Twitter [ LINK ]
    Support ! [ LINK ]

    Comment


      #3
      Awesome! Works exactly like I was hoping it would. Thank you so much

      Comment

      Working...
      X