x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.19
Tags:
more ▼

asked Jun 04 '18 at 08:41 PM in Blueprint Scripting

avatar image

Immensive
1 1 2 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Jun 04 '18 at 10:40 PM

avatar image

phil_me_up
1.6k 6 6 12

avatar image Immensive Jun 05 '18 at 03:48 PM

Thanks for reply!! My aim is not to record the brush strokes, i need store just the results (the texture). However It is possible to do it using some blueprint nodes available into the engine (Only in the editor). So to have the same results in a packaged project i thinked that I should clone the item after stored into array. But actually I have not found solution.

avatar image mightyenigma Jun 07 '18 at 04:01 PM

WOuld it work to use a reference instead of a deep copy as the item in the array?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question