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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

How to move functions from one class to another?

Hi there,

Sometimes I have to do some refactoring. Currently I'd like to move some complex functions with many local variables and such to another class. I can copy & paste the nodes, but the local variables along with there descriptions and default values are lost.

What is the most efficient way to move blueprint code between classes?

Thank you, spyro

Product Version: UE 4.8
Tags:
more ▼

asked Jul 23 '15 at 12:52 PM in Blueprint Scripting

avatar image

spyro
1.7k 105 116 229

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

I don't think so, if there no copy when you right click function then no. If your function does not interact with object itself, you could move those functions to blueprint library, you could also make "target" argument so you can input object you want to effect. You might also consider relating classes if that possible put functions in base class and other class will inherent.

more ▼

answered Jul 23 '15 at 02:06 PM

avatar image

Shadowriver
35.7k 925 168 1104

avatar image spyro Jul 23 '15 at 03:55 PM

Thank you, but I'm afraid this won't work here. I just want to move many code from my pawn to the game mode.

In any other language I would just copy/paste the code, but that doesn't work for variables, only for the nodes itself.

(comments are locked)
10|2000 characters needed characters left
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