I’m currently working on a combat game that features team play. One of the things is that in addition to randomly selecting a team name from a list of team names from each of the four teams, a team graphic is also selected from a list of decal asset ids.
Problem
The issue that I’m experiencing is that I am not sure how to apply a team graphic to an already existing shirt. The basic shirt in question is all white that is colored to match the team color and has no graphic. I have tried to apply a decal to the shirt instance itself but that did not work. I have also tried applying the decal to the upper torso which does work, but it doesn’t look very good. What other options are there for this?
Well, I did mention that it was a basic white shirt in the original post, and all players who are on a team get the same shirt regardless of what team they are on. The shirt the team color. The code is nothing special. It just creates a shirt instance, sets some parameters for it, then stores it so it can be cloned onto the player later.
After doing some digging, I did find a ShirtGraphic class that seems to do what I need it to do. So now I also create that instance and clone it onto the player as well. I’m still working on that code, but this does appear to be the solution.