My GameInstance is growing. So I thought it would be a good idea to separate some parts into different classes to have a cleaner code. However I am having some trouble doing this.
For example, I have made a new class so that it handles only the matter of friends.
And instantiate it in the overridable function Init()
So I tried the code and the program crashed.
The commented code works perfectly. However, the function call of the friends member causes a crash. (both execute exactly the same code).
I also deleted all the binaries and built everything from scratch.
Now everything works!!
The problem is that I’m not sure what the real problem was.
1-Incorrect instantiation of the friends object?
2-The constructor was not executed?
3-Can’t pass pointers to class member objects?
4-The binaries were corrupted because maybe it builds with patches?
If anyone can answer these questions I would really appreciate it.
They changed the behavior of the constructors… All variables take zero value even if you give them a non-zero value…
I also think that the compilation is done in pieces… And sometimes a piece is not updated. And unwanted things happen. So I think it’s a good idea to delete the binaries from time to time.