Is there any way I can require my gameobjects to have a certain child object?

I made a health canvas and I want certain gameobjects such as soldier, tank, and aircraft to have that health canvas as a child object. Is there anyway I can do this through code? Is this something that’s usually done when making an RTS game?

I use the perspective that such a notion is not that of requiring an object to have a child, but of forming the relationship in code. I have an example on a robot platform where I wanted a relationship of objects to create the 4 wheels. There’s a hub, a tire and a physics object array (several box colliders that form a kind of tread for the wheel). The model only has the axle, but that axle has a script which forms the collection at initialization. I suggest you consider deriving soldiers, tanks and aircraft script objects from a common base (which itself derives from MonoBehaviour), from which the initialization of that base would enforce the health canvas child by creating it (perhaps conditionally if you prefer).