miwarnec / DOTSNET

Public DOTSNET issue tracker
20 stars 0 forks source link

Dependency Injection documentation has code example errors #21

Closed Kerozard closed 4 years ago

Kerozard commented 4 years ago

Describe the bug GetExistingSystem() is used incorrectly in multiple places in the Dependency Injection section of the documentation.

Direct Link: https://docs.google.com/document/d/14l5hz3QJ1Aw8nuVTrbrAtr-UoGBiXyvToW_tO5jYcQg/edit#heading=h.ii1agvl4wmw

To Reproduce Steps to reproduce the behavior:

  1. Go to the Dependency Injection section of the documentation

Expected behavior The presented syntax should be correct.

For Example: server = GetExistingSystem<NetworkServerSystem>().;

Apart from the trailing dot, it should probably be

server = World.GetExistingSystem<NetworkServerSystem>();

since the Bootstrap references are not set yet when autocreated systems are being set up.

miwarnec commented 4 years ago

Hey, thanks for feedback. The example was mostly to show what we dont need to do anymore, so I used the shorter syntax :)