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"

Edit nested object variables on Actor?

First off, thank you all for all your help. The UE forums are fantastic for finding answers to my noobish questions before I ask them.

Now to the question. I created a Spell class in C++ that has variables of two other types of UObjects inside it.

 UCLASS(Blueprintable, BlueprintType)
 class Spell : public UObject, public FTickableGameObject
 {
     ClassA* otherClass;
     TArray<ClassB*> thirdClassArray;
 }

In my actor blueprint, I have a variable of type Spell. However, I would like to edit the spell variables from the actor blueprint in the details pane, without having to create a custom child blueprint for every new spell. All I can do is assign the Spell* with an object that already exists in my project hierarchy. I want the designers to be able to modify the sub-values directly on my actor or use a predefined class. The problem is I dont know how to expose those variables, I can only expose a Spell pointer. Anyone have any ideas?

Product Version: UE 4.9
Tags:
more ▼

asked Oct 19 '15 at 01:36 AM in C++ Programming

avatar image

Gamingdrake
3 1 3

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

1 answer: sort voted first

You can't, first of all objects can't be set in defaults, because they don't exist when you edit them, you can only set them in detail tab when you place object on level and it can you can only pick other object in level. You can pick class if you use UClass* or TSubclassOf but you can't edit defults there either. So you will need to work around it.

Do you though of using structs? In blueprint they are limited but in C++ they can have function and inherence and it will still work in blueprint (ofcorse you wont be able to call structure functions, but you can make class functions that do so). But more importunately when you make structure property you will be able to edit it's variables in defaults.

more ▼

answered Oct 19 '15 at 02:20 AM

avatar image

Shadowriver
36.6k 932 169 1111

(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