"Get Class Defaults" variable returning none"?

Hello, I have an array of actor class references, and I am trying to create buttons on my UI that correspond to a class so that I can click the button to spawn an actor into my game. I am only at the stage of creating the button at the moment and I am trying to change the button’s appearance based on the classes default values.

For example, I am trying to display the cost of the unit by using the ‘get class defaults’ node, but it is throwing errors as if these variables are ‘none’ by default and I don’t understand why.

If someone could explain what I am doing wrong here I would be very grateful.

Thanks in advance.

282968-capture.png

Thanks, you put me on the right track for finding the problem and I think I have found it now. I have an ‘master array’ and a ‘local array’ of classes and I had a remove node somewhere that it shouldn’t be. I am pretty sure it is solved now but I will update in a few days if the problem persists.

If something accessed “None” it means that data is not valid. What’s inside Unit Selection Array? When it is being set? With what data? Can you use IsValid? node before Get Class Defaults?

I converted my comment to an answer for clarification. Please let us know when you confirm your solution. It may help other people with similar issues in the future. Good luck. :slight_smile: