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"

Using Blueprints only as Prefabs?


I come from Unity where the workflow that pretty much everyone is using is to create prefabs and expose multiple values in the editor (by setting them as public member variables) so it's easy to change them without touching the code. I really like that workflow since it enables programmers to do most of the work in the code, while designers and artists can change values and quickly prototype.

What would be a similar way to do this in Unreal? Am I correct to assume that Blueprints can play the role of Prefabs in that case (i.e. using Blueprints only for their capability to edit their values inside the editor, and not the visual scripting)? Is there a major performance hit compared to just instantiating the C++ classes directly and having the values hardcoded in the files?

Basically, I guess I'm just looking for the best way to implement all the features in C++ without using visual scripting, while still being able to quickly edit the values/properties of the actors inside the editor.

Product Version: UE 4.10
more ▼

asked Dec 07 '15 at 12:17 PM in C++ Programming

avatar image

1 1 5

avatar image Enlo Dec 07 '15 at 12:27 PM

Yes, you can create blueprints in C++ and expose variables. So I guess they are kinda like prefabs.

There are tutorials on the wiki;one, two. But yes, blueprints are slower than native C++ code. The question is, if "slower" has any impact at all (eg how much code there really is).

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

1 answer: sort voted first

Blueprints are only slower when comparing a Blueprint created function to the C++ equivalent. Using BPs to hold data values to have easy editing is the same perf.

Now back to the original question, any UObject with a UPROPERTY that has edit meta data can be easily tweaked in the editor UI.

 bool bSomeToggleValue;

The code above will natively expose a property for editing in the Unreal Editor

more ▼

answered Dec 07 '15 at 07:58 PM

avatar image

joeGraf STAFF
1.5k 35 12 69

(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