Skip to main content
added 146 characters in body
Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345

The canonical way in Unity to create "data-assets" is by implementing ScriptableObject's. This allows you to create a custom type of asset which you can then create and maintain in the Unity editor (optionally using some custom editor controls which you also need to program). This would allow you to create aUnitType asset with all the fields mentioned in the question and then assign the UnitTypes to units in the scene.

But you might have a hard time to create these automatically from Google Docs spreadsheets.

Formulas are game mechanics, not game data. So they should be hard-coded into scripts. If you prefer to have all your mechanical formulas in one place, you could do so by implementing them all as static methods in a stateless class.

The canonical way in Unity to create "data-assets" is by implementing ScriptableObject's. This allows you to create a custom type of asset which you can then create and maintain in the Unity editor (optionally using some custom editor controls which you also need to program). This would allow you to create aUnitType asset with all the fields mentioned in the question and then assign the UnitTypes to units in the scene.

But you might have a hard time to create these automatically from Google Docs spreadsheets.

Formulas are game mechanics, not game data. So they should be hard-coded into scripts.

The canonical way in Unity to create "data-assets" is by implementing ScriptableObject's. This allows you to create a custom type of asset which you can then create and maintain in the Unity editor (optionally using some custom editor controls which you also need to program). This would allow you to create aUnitType asset with all the fields mentioned in the question and then assign the UnitTypes to units in the scene.

But you might have a hard time to create these automatically from Google Docs spreadsheets.

Formulas are game mechanics, not game data. So they should be hard-coded into scripts. If you prefer to have all your mechanical formulas in one place, you could do so by implementing them all as static methods in a stateless class.

Source Link
Philipp
  • 123.2k
  • 28
  • 264
  • 345

The canonical way in Unity to create "data-assets" is by implementing ScriptableObject's. This allows you to create a custom type of asset which you can then create and maintain in the Unity editor (optionally using some custom editor controls which you also need to program). This would allow you to create aUnitType asset with all the fields mentioned in the question and then assign the UnitTypes to units in the scene.

But you might have a hard time to create these automatically from Google Docs spreadsheets.

Formulas are game mechanics, not game data. So they should be hard-coded into scripts.