Download

Any classes in unreal that can allow classes to easily talk to one another without needing include?

I went through some of the unreal C++ tutorials and when I did I started to think about more practical design of a video game.

One of the things I prefer is a msg class, so I can send generic enough messages around the engine without knowing much about it.
All the examples seem to constantly want to bring in a include file to a script for anything that was built with any type of reference to it.
So I end up building classes that become very tangles webbed together, creating a debug night mirror in the future.

In a video games, I prefer to not need to know a lot about other classes.
Try to keep code separated so that if I need to change something in one class I dont need to edit 10 other classes.

Here is a perfect example of what I am asking… I came from unity so forgive my ignorance if I am just missing something.
http://wiki.unity3d.com/index.php/CSharpNotificationCenter

Thanks

Use the Messaging Module. Using a messaging infrastructure is a great way to decouple services and classes from each other. Here is a slew of references for you to learn how to use this module:

https://docs.unrealengine.com/latest/INT/API/Runtime/Messaging/IMessageBus/index.html
https://docs.unrealengine.com/latest/INT/API/Runtime/Messaging/IMessagingModule/index.html
https://docs.unrealengine.com/latest/INT/API/Runtime/Messaging/IReceiveMessages/index.html
https://answers.unrealengine.com/questions/178744/message-system.html
https://forums.unrealengine.com/showthread.php?85482-controlling-game-from-exterior-pc
http://www.unrealengine.academy/2015/06/12/unreal-message-bus/

Thanks, I will be looking into all this again soon.

Also check out delegates

@Stack_Overflow - please try to avoid bumping 2 year old threads like this, this is #2 now :eek: