Visibillity of a variable after switch
I am currently working on a simple bleurprint system that lets me create traffic signs from a set of choices (arrays with pre made textures, models, etc)
But since there are alot of signs I divided the signs in categories to keep stuff clean and organised. In one part of my blueprint I set the material intance, and for that i currently have 2 categories (w1-curves and turns, w2-intersections) but there will be a lot more categories. So for clearity I dont want to have them all visible in the bleuprint at start, or one massive array with all of signs in it.
So I put in a switch that controls witch array is active. But I want only the array that is active to be vissible as i stated above. I know I can control the exposure in the variable tab, but is there a way to control that from within the construction script?
Or is there another solution to get what I try to achieve? Like sub categories in an array, or something? Im kinda stuck with this atm. I could ofcourse build separate BPs for each categorie, But I rather have it in one neat BP.
Hopefully someone can help me out, Thnx in advance :)
asked Dec 13 '18 at 11:09 AM in Blueprint Scripting
There's no way to control variable visibility ('Editable' switch) from blueprint logic, but it would be an useful feature.
One of the things that you can do is to use DataTables for that. It also should be easier to edit & maintain the data this way. For example:
Create a SignData structure:
Create a DataTable from this structure for every Sign Type you have. Let's say the first one will be named "W1_Signs", here is how it looks like with some test data:
Then, in your blueprint create a variable of type "Data Table Row Handle":
Now, you can easily select your sign type and immediately pick one of the signs like that:
This way every time you select a Data Table with specified sign types, the Row Name will match it, so there will be no unused arrays/enums in the variable tab.
answered Dec 13 '18 at 01:32 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here