Download

Component variables accessible from Editor window

I would like to edit variables from components from inside a blueprint throw the editor window.

I have 10 “Bunnies” sharing the same BP and the all have different value for their component “blowUpOnTouch”, right now i need to either create a copy of each var in the constructor of the BP or create a parent class for the BP with the necessary var for blowing up.
Problem is this break the concept of component. As soon as i will have more components and more animals its not gonna because they may not all blow up some might hug you instead.

This is a simple example but with a more complex one it even become impossible to manage to “copy var in BP way”…

So is there any other solution to this ? I need to personalize component values from object within the editor (when they are in the world) without having to duplicate BP or other tricky solution that might become a problem on large scale.

Just so I understand your situation, you have 1 rabbit Blueprint, and 10 instances in the level, and you want to modify a property on a component in the BP on a per-instance basis? The current workflow is to add a variable to your rabbit Blueprint, make it editable, and then use it in the Construction Script to set the bool on your component. You probably saw this video already which briefly covers this:

http://youtu.be/6RqDo3012YA

There are a couple of reasons for this approach:

  1. You might later change the internal structure of your BP, and by separating the exposed variable from the underlying structure, you can keep all instances working.
  2. We didn’t want to allow exposing all properties of a component, as we want to keep options on a BP instance as concise and simple as possible.
    We have discussed making it easier to expose specific properties of components, but we have not had time to investigate this further yet.

Well what i wanted to do is an inventory system in the form of a component which you can add on anything in the game, a bag, a *****, the player…

Items are made out of BP which extends a common custom Class “Item”.

Workflow that i wanted is open any other BP, add an inventory as a component. Then place several instance of the object inside the editor and adjust the content of each inventory throw an array of “Item”. Each of those items also have a few variables, for examples “ammo pack” could contain 5 to 15 ammo.

It seems like i can create some sort of array variable within the BP that is accepting my “Item” class, then i should set the inventory array to the BP array throw the construction script. Only problem is it doesn’t seems to allow me to edit the items properties, they are just references.

Also i would like to make it as easy as possible, just adding an inventory and then edit what is inside within the editor view was what i wanted.