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"

Attaching scripts to objects via editor

Perhaps this is already implemented, and I just haven't seen it yet, but is it possible to attach scripts (C++) to objects through the editor?

Unity3D has an excellent tool within the GUI that allows users to write a script in VS or MonoDevelop, save it, and it then appears in the browser window within the Unity GUI. From there, you can literally drag and drop that script onto the object in a scene.

Is it possible to have similar functionality in UE4?

Here is an example of it:

alt text

alt text

Product Version: Not Selected
Tags:
more ▼

asked Mar 11 '14 at 03:05 AM in Using UE4

avatar image

ue4-archive ♦♦ STAFF
49.9k 3658 1983 9111

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 03:05 AM

I would like to add that the major benefit to this is that you can write multiple boilerplate scripts, then attach any number of them to any object in Unity, which is pretty much the only thing I like in that engine. So naturally I would like to know how that could be handled in Rocket!

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 03:05 AM

I agree, that's exactly why I like it too.

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

1 answer: sort voted first

Hi,

This is an area that we're interested in improving, but we don't have firm plans yet.

Currently, adding behavior always requires creating a new class (either in C++ or as a blueprint), although that behavior can be encapsulated and mixed in by creating components. You can already create components that work very similarly to Unity behaviors, which look at the actor they're attached to and search for other components they want to interact with (or just directly interact with the root component of the actor, in the case of simple motion behaviors).

For well structured systems, we generally prefer the code living in the actor class, since you have guaranteed availability and type safety of your added components (no spending the start of the behavior finding or creating any components you need). However, for prototyping and one-offs, being able to quickly mix in without creating a new blueprint is certainly desirable.

Cheers, Michael Noland

more ▼

answered Mar 11 '14 at 03:05 AM

avatar image

ue4-archive ♦♦ STAFF
49.9k 3658 1983 9111

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 03:05 AM

Thanks for the response Michael.

I'm finding that a lot of the functionality I was looking for is already in the editor, albeit a bit hidden at first, through the Blueprint Editor (look at the components and details panes) and the property editor.

Both of which allow me to make changes to the variables stored in the classes without having to constantly rebuild scripts or open Visual Studio.

I'm still diving in a bit more, so I'll let you know if I come across any other things I'd like to see integrated.

(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