-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved GameObjects initialization, fixed the possibility to break GameObjects from outer assemblies, made prediction - related methods overridable in Spell.cs #96
base: master
Are you sure you want to change the base?
Conversation
💯 |
🔥 |
@@ -72,7 +73,7 @@ public static void Init(string[] args) | |||
Logging.Write()(LogLevel.Info, "[SDK Bootstrap] Resources Initialized."); | |||
|
|||
// Load GameObjects. | |||
GameObjects.Initialize(); | |||
RuntimeHelpers.RunClassConstructor(typeof(GameObjects).TypeHandle); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This executes the .cctor if it hasn't already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather not see any dirty reflection methods to achieve this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How it this reflection or a dirty method?
There are essentially 2 approaches to expose the lists / public properties in GameObjects
The current IEnumerable approach is bad because it is slower to use and anyone can cast it back to List and do whatever he wants. Just my 2 cents :roto2: |
Or just implement cache in the core :^) |
🍿 |
No description provided.