Announcement

Collapse
No announcement yet.

Component dependency?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Component dependency?

    Hi All,

    I'm trying to wrap my head around components and I have the following scenario:

    I have a data structure that I want to share between two components. These two components are optional, but the user can use any combination of them. I'm thinking about having a base component to store the data structure and then have the two optional components be children of that. What I'm thinking about doing in my blueprint is as follows:

    Base Component
    |
    --- Optional Component 1
    |
    --- Optional Component 2


    The questions I have:
    1. What should the base compoment derive from? It simply just stores data that the optional components can use.
    2. How can I setup a dependency so that the optional components must be a child of the base component?


    Am I not thinking about this the Unreal way?

    Thanks!

    #2
    I haven't got around to looking through the code enough to know how UE4's component system works. There are multiple ways of implementing component base programming, each with different quirks.

    However, here's a great article about component based programming versus traditional OOP that might be useful reading to you: http://cowboyprogramming.com/2007/01...your-heirachy/

    Comment


      #3
      Originally posted by ShadesOfRain View Post
      I haven't got around to looking through the code enough to know how UE4's component system works. There are multiple ways of implementing component base programming, each with different quirks.

      However, here's a great article about component based programming versus traditional OOP that might be useful reading to you: http://cowboyprogramming.com/2007/01...your-heirachy/
      Thanks for the link! Definitely will help me wrap my head around these concepts.

      Comment


        #4
        No problem. Always glad to help.

        Comment

        Working...
        X