How to use a "very global" variable with Interfaces ?

Hello all!

I have difficulties since I tried to integrate a character selection level, getting two gender characters based on the same parent class.



Since the male character is set as Index 0, and female as index 1, I would like to use this variable as a Global / Master variable through interfaces to set alot of content along the project!
Using this integer with the “Select Node” to set different animations, sounds, meshes, transforms, and so on…

(here the Interface in the Base class)

I have the correct Index when Spawning on the second level but cannot transmit that same Index to the “test” BP_Cube, which supposed to change it’s material color from the GenderIndex Value.

So, I wonder also what would be the best approach to set and use this kind of data.. :face_in_clouds:

Thanks !!

One way to handle it globally (without the need for an interface) is to have a GenderIndex variable in the GameInstance. You set that once (during menu selection) and then whichever class needs it throughout the game play can pull it from the game instance.

Okay, then I will look for Gameinstance, so much to learn everyday! Thanks for the direction :face_in_clouds: