Confusion about how to use
Posted: 07 Feb 2019, 16:34
This is a great project you have here. I have got it working in Unity with a minor fault in how I'm thinking about it and want to ask about it.
My setup is I have a GameManager object with a script. This is going to house all of my data. I attached my View to the MainCamera with a script, and I attach the GameManager script as a public variable in this script. I set the View's datacontext to this MainCamera script.
The issue I'm having is when everything's initialized, the camera comes first, so my count of objects is 0. I can redo the count by putting this in the update but I feel that's excessive since it only needs to be calculated once at the start.
So I'm asking. What do you guys normally do in this situation?
If you need specific code, I apologize it will have to wait until I get home.
My setup is I have a GameManager object with a script. This is going to house all of my data. I attached my View to the MainCamera with a script, and I attach the GameManager script as a public variable in this script. I set the View's datacontext to this MainCamera script.
The issue I'm having is when everything's initialized, the camera comes first, so my count of objects is 0. I can redo the count by putting this in the update but I feel that's excessive since it only needs to be calculated once at the start.
So I'm asking. What do you guys normally do in this situation?
If you need specific code, I apologize it will have to wait until I get home.