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"

Construction script spawning vs placing in editor

Is there a difference in performance between the 2 methods? Is the construction script ran on game start? The reason I ask is that I am trying to generate levels with tiles read from a CSV file and I don't think it would be a good idea to iterate over all that tile data at runtime and instead would prefer to use the construction script to place everything in the editor and have it already placed at runtime if it saves performance.

Am I just misunderstanding how the construction script works?

Product Version: UE Github Master branch
more ▼

asked Jul 13 '18 at 04:48 AM in Blueprint Scripting

avatar image

166 13 19 32

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

2 answers: sort voted first

Ofcourse, it is better to spawn something in Editor, not in runtime. But it depends on your purposes.

With blueprints use construction script to spawn/generate environment.

With C++ use PostEditChangeProperty, to update procedural generation.

Here is few examples with blueprints from my work.


more ▼

answered Jul 13 '18 at 06:07 AM

avatar image

4.3k 82 20 104

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

Construction script is called in editor and again when packaging. This means anything which could randomly change on construction may not necessarily be the same in the final game. However, if it is always the same, spawning actors in the construction script is fine. It is not run again for placed actors, but actors spawned at runtime will run the construction script.

more ▼

answered Jul 13 '18 at 07:16 AM

avatar image

236 1 3 8

avatar image Althaen Jul 13 '18 at 09:52 AM

So it only runs in those situations and not every time you run the packaged game?

avatar image herobank110 Jul 13 '18 at 10:05 AM

Yes, for actors already placed in the world

(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