XNA Initialization in the game called only once?

I know that LoadContent and UnloadContent have the ability to call more than once. However, I wonder if Initialization will be able to be called more than once. The documentation does not really go for it. Or is it better to do most of my โ€œinitializationโ€ in the constructor?

Thanks,

+4
source share
1 answer

The information you are looking for is indeed in the documentation for Game.Run . You can only call Game.Run once, and it calls Game.Initialize once.

The advantage of doing initialization in Initialize instead of the constructor is that when you start Initialize graphics device is created (although itโ€™s obvious that almost all the things you can do with a graphics device must be done in LoadContent ).

To answer this question, a reflector is useful.

+4
source

All Articles