Board Games and Scene Hierarchy w/ GameObjects

Hello everyone - I’m looking for some ‘Best Practice’ guidance.

I’m developing a board game (Scythe, with my own custom rules and such) and am wondering what the best practice is for using the hierarchy.

For example, in Scythe, a player can have different types of units on a tile - Their Character, Worker Meeples, and Resource Tokens. Should I stash the gameObjects that represent the character, workers, and resouces as a child of the tile they’re presently on?

Alternatively, is it better practice to leave things where they are in the Hierarchy and rely on code to handle everything in terms of location? IE, each resource on a tile would be held in a list of resources, rather than found at runtime with a GetComponentsInChildren call?

Tracking by code seems to be more ‘correct’, but moving objects around in the hierarchy feels like it adheres to the board game paradigm. Which approach would you choose? What do you recommend?

The shape of the hierarchy should only relate to the things that a particular hierarchy gets you from Unity.

For example, UI has to be parented a certain way.

Another example is being able to do a bulk operation on a single GameObject, such as the GetComponentInChildren you mentioned, or Destroying something, or disabling it, etc.

Also, prefabs that are made of multiple GameObjects in a hierarchy are generally done so for a reason.

The only other FAR less important reason for organizing hierarchy is just to make it easy to find stuff, but that is not very important because you can just use the search field in the hierarchy.

Far more important is how you define and approach your problem, and even more important than that is you pushing ahead and trying things, then changing course if necessary. It is software after all… it is SOFT! :slight_smile: