Duplicate/Rename item into array
Hello there, I'm working on a project for that I need to duplicate an item with another name after stored into array. The item to be duplicated is a Render Target 2D. I create the Render Target using "Create Render Target 2D", then I store it into array, and set it as texture parameter value of an instance material. I draw on it for a period with a brush, then I would clone it and store into another index of the array in order I can use it as start reference for another material instance. For to this I presume I should duplicate it. I know that I could solve setting variables, but it would be just for a setted number of cicles. Instead I need do it for an unfixed number of time. How can I solve it? Many thanks in advance. Please say me if the logic is wrong.
asked Jun 04 '18 at 08:41 PM in Blueprint Scripting
Are you trying to achieve this through blueprints? I'm not actually sure if it's possible to clone objects within blueprints or not (I'm sure there will be a way), however I thought I might offer an alternative approach.
To me, it sounds like you want to basically capture the history of 'brush' strokes made by the player. Presumably to play back later or allow some undo / redo option. Capturing a render texture for each of these periods will become expensive. It can be quite slow and will use a lot of memory (which will be a problem if you're releasing on a mobile platfom). So instead, why not record information about the brush as it paints. You can capture all of this data into an array each frame, or at some suitable time interval and then when you need to, you can 'replay' that stroke simply by running the array and performing those actions again.
answered Jun 04 '18 at 10:40 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here