Hello,
I am making a blueprint which will change some objects’ materials to one single material and then turn their materials back to the initial ones.
For that I am making a copy of an array of components trying to save their initial information before changing. Then I change materials of the initial components, and come back to the copy of the components to extract their materials back. But their materials are already vanished and all are called like Material Instance Dynamic 90 instead of real different materails.
How to save the copy of components as a fully separete copy with all materials?
This is the blueprint, but probably it is not very clear. However I am attaching. Thank you.
This is a full size of the image: question.jpg - Google Drive
I’ll be very thankful for your help.
Thank you @ClockworkOcean, I indeed already tried to save materials as well but for some reason in this case it applied marerials randomly in not the right order. Like Arrays are getting mixed inside for some reason. Can it be? And what can be the reason? I am also going to try to save materials in arrays inside arrays, maybe it will allow to save the order. Before I saved them in a single array. I will update you asap probably tonight.
@ClockworkOcean thank you for your replys. I make a functions where by pressing “X” some but not all objects turn to X-Ray material, let’s say like an X-Ray Glasses function. It is a transparent material with Fresnel on opacity. So, some objects become like holograms or under X-ray. Honestly there are a lot of objects which I have already placed in the scene so it would be difficult to reasamble them into a bluprint, that is why I try to retrieve them right from the scene.
About your StructA advice, do you mean I should create a structure to keep the materials? Well, I already tried it for components, and it works absolutely the same way as a variable. Frankly I am pretty new in UE5, so I never used structures before. However, it turns out that it looks almost the same like a variable for me, just in a separate file.
@ClockworkOcean thank you bro Can I ask, is there a way to create something like arrays into arrays in BluePrints? UE5 advises exactly what you said, to use a struct. But I can’t find the way of adding new variables via BP to a struct. So like adding a new array into an array, I hope you understand what I mean. So mainly I am going to use a struct like an array or arrays you know. And I need a way of adding new arrays to this struct, could you give me a tip of how to do it please? Thanks in advance.
Oh God, guys, @ClockworkOcean and @Supremative thank you very much for your help. Now I will explore both of your options and will update you after finishing it.
Many thanks for your guys again.
Hello @ClockworkOcean
So, I used your option and maan, it has gave me good knowledge about using maps as nested arrays. Thank you very much. It totally works. I wish you all the best man You have very helped. Can I ask, what do you do for living? Do you develop games for a company or maybe do it as an indie studio?
Hello @Supremative
Your option is just incomprehensible
It looks like you are very smart
I am more than sure that it works well, but I’ve not tested it since the first option of @ClockworkOcean works well, and I am fine with using structures. However, your option is very impressive, thank you very much for it.
@ClockworkOcean
Wow, cool, do you think someday we could make something together?
I am mainly a 3D Artist and a Web Developer, but I’ve been studing UE5 for a year and can make simple levels. My websites are: https://naiuma.com and https://designeling.com
I would like to create a shooter about distant technologocal future.
So, if you think you have time and desire to join together for work, please let me know.