First post ever so I hope this is the correct place. I am into my second month of converting over from Unity and I am really loving Blueprints. However, even after watching a ton of tutorials on referencing, I can’t figure out how to gain access to a child objects class and not the component. Let me explain.
I have an Actor Class called Touchspot Object.
I then have a Widget Class called Touchspot Object Icon. This is simply a Button with an image assigned to it. This button also has a Fade In and Fade Out animation.
On the Touchspot Object I added a Widget Component of class type Touchspot Object Icon.
I was then able to drag the **Touchspot Object **into the scene and press the attached Touchspot Icon Widget Button. Any code assigned function as expected. However, thats when things sort of got complicated. I have (6) Touchspot Objects in the scene. Each one of them speaks to a different Item in the scene when its **Touchspot Object Icon **button is pressed. I have a public variable that I used to drag the objects each one needs to speak to. I also added an exposed Integer value that I can use as an ID of sorts, which I assign each object in the editor.
This is where the trouble is. When an objects Touchspot Icon is pressed I call an **Event **which is defined in Touchspot Object. This event simply checks the ID and the fires off another event which takes that ID as an argument. The final object takes that the ID passed to it from the Touchspot Object and uses it in an enum to do whatever.
I cannot seem to get a reference to Touchspot Object from Touchspot Icon. I created a variable of type Touchspot Object and linked that to the target connection of the event node. On the Touchspot Objects event node I just linked a print node to see if it even works. It does not work at all and I am getting no errors.
I also wanted to play the fade animations of from Touchspot Icon from Touchspot Object but I can’t get access to the class. It says it doesnt inherit from the Widget Compnonet.
I hope that was clear enough. This is kinda important since it is for a job. What am I doing wrong?