how to name class that loads unit types in constructor, unity
- User
how to name class that loads unit types in constructor, unity
- Assistant
- User
how to name class that has data about units like
"unitName" : { "path": "", "type":""}
- Assistant
For a class that holds data about units, including properties like "unitName", "path", and "type", you want the class name to clearly reflect its role as a container or descriptor of unit data. Here are a few naming suggestions:
- UnitData: This is succinct and makes it clear that the class holds data about units.
- UnitInfo: This name indicates that the class holds informational attributes about a unit.
- User
it has array of items like this
- Assistant
If your class is intended to hold an array of unit data items, you might name it something that reflects it being a collection or repository of unit data. Here are a few suggestions:
- User
i have unit type like melee, range etc. but i also have unit type like ogre, archer etc.
how to name second
- Assistant
- User
how to name class that does this
private void AddUnitTypes() { foreach (var type in GetType().Assembly.GetTypes()) { if (!type.IsAbstract && type.GetInterfaces().Contains(typeof(IUnitType))) { var typeName = type.Name[..^4]; UnitTypes[typeName] = type; } } }
- Assistant