The day has finally come. I've created my first art asset. A simple placeholder silhouette for my Corporate hierarchy tree.
I'm sure it's not much to any savvy artist, but it took me about an hour. I chose to go with Photoshop because of the myriad amounts of tutorials and help I can find on how to do what I need to do. I will eventually need to deal with art assets, and I haven't decided on whether to do them myself or not. But I do need to start getting placeholder art in, so here we are.
At first I was attempting to create some type of table to place employee cards down on, with slots for jobs. I discovered very quickly though, that text is a pain in the ass if it's not UI. The only solution I could see was to have separate sprite art for each employee name or job name. So I scrapped the entire sprite idea and went back to everything just being UI.
The first thing I wanted to happen was to be able to scroll the screen, move around and view the entire corporate hierarchy. That was the original reason I wanted to do sprites and cameras. I realized quickly that I had no idea how to deal with cameras, and spent a day learning. But now that we're simply dealing with UI, I have to keep everything in view of the UI "portal"...so instead of moving the camera, I created an empty game object called "Table" and when I right click and move the mouse, it moves the object and everything attached to it. I keep the background and the camera static, and simply move things off camera.
The bottom panel will spawn in "idle employees" or unassigned employees. You hire an employee, they pop up in the bottom, and then we drag them to empty slots available. The first step was to get the employee cards to snap to where they need to go. The job slot highlights when we get near enough, and then the position is set over the inset. If we drag the employee card back to the bottom panel, it snaps to a grid inside the panel. Simply changing parents when things enter and leave is pretty simple to do.
However, this also poses a problem. Unity's UI renders by hierarchy. So objects higher in the hierarchy get rendered first. So if the employee cards somehow get above the job holders in the hierarchy, they will be under the job holder visually. Have to find a way to manage all this as we press on and I start spawning job holders in later, which would mean that they are below the employees in hierarchy (bad thing).
So for now, it works. Employee cards snap to where they're supposed to, and when I right click and drag, the objects that are supposed to move do. I need to add in a zoom out feature eventually to add more detail, but for now it works fine.
Next step: When we load this screen, populate the hierarchy. Have employees already in their job slots, have a tree with managers and the CEO and team leads, with employees attached to all of that. And it needs to spawn dynamically. If I choose a different owned company, it needs to repopulate the screen. Later, once that is working, we will have green or red highlights for job slots the employees can go to, and productivity bonuses based on how many employees a team lead has or is managed correctly or whether the employees are better at the job than the manager. All interesting stuff.