Skip to main content

GameObjects

All game objects in the SharpEngine.Core.* libraries follow a certain structure:

  • Everything is treated as a Scene Node.
  • No object contains a public constructor.
  • Constructors are meant to be parameterless.

Initialization of game objects are meant to be used through the static GameObject.Create<T>(T instance) and GameObject.Create<T>(Action<T>? configure) interfaces.

This is so that all objects initialization can be easily reinvoked by the system, and to avoid unintended bugs made with the object initilization syntax.

Note: This behaviour is strict within the engine itlsef, but it is not forced on you the developer.
If you wish to inherit from the `GameObject` class and create a public constructor, you are free to do so.