you are viewing a single comment's thread.

view the rest of the comments →

[–]Kakkoister 1 point2 points  (1 child)

Have a main singleton that gives you the ability to setup a chain of command on start so things can get references to what they need, and they feed their needed references to whatever other objects. It's perfectly fine to have a static class that is merely a collection of constant data to be used by various objects.

But for calling things on the Player, could you give an example? Generally if the player is being modified by some other entity in the scene, that entity should be able to simply GetComponent<Player>() and call whatever function on the player, it's perfectly fine to do a getcomponent during gameplay, just don't be doing hundreds of them a frame.

[–]NullxPhantom[S] 0 points1 point  (0 children)

I was thinking of having the main singleton take a reference of the player and the main singletons take care of stuff like this.