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"

No "Expose on Spawn" option for 'class' variables

I'm trying to pass in an array of actor classes into a blueprinted actor in its construction script so that it can later spawn objects from those classes, but I noticed that "class" type variables don't have a "Expose on Spawn" option, therefore I cannot pass in the array of classes I need when spawning this actor. Why can't "class" variables be exposed on spawn?

(Note: I noticed "text" variables also don't have this option)

Product Version: Not Selected
Tags:
more ▼

asked Sep 28 '14 at 07:04 AM in Blueprint Scripting

avatar image

FakeEnema
121 7 13 20

avatar image FakeEnema Sep 28 '14 at 07:47 PM

To note, this is with version 4.4.0 of the engine.

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

1 answer: sort voted first

Oh, odd, I just discovered that a variable that holds classes is automatically exposed on spawn if marked as "Editable". Slightly out of the norm and not obvious, but it solves my problem.

more ▼

answered Sep 28 '14 at 07:21 AM

avatar image

FakeEnema
121 7 13 20

avatar image FakeEnema Sep 28 '14 at 07:47 PM

After further experimentation, it turns out that the automatically exposed array of class variables doesn't work; it does not actually initialize the array with the array that is passed in on spawn. Aside from that, it turns out that a single instance (not array) of a 'class' variable does not automatically get exposed on spawn. So it looks like this issue is still valid.

avatar image HuntaKiller Oct 27 '14 at 08:06 PM

I noticed this myself, seems weird to have to create 2 variables, one mimicking the other, just to be accessible in the constructor.

(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