Challenge + ScriptableObject

Agree with Marc that this challenge could be less prescriptive.

Also as the UnitFiring script has 3 potentially tunable parameters, which may differ with different unit types, at this point I’d expect to be using a ScriptableObject to hold those parameters. Not sure if this is done later in the course though.

I did try to implement this but ran into some issues with client syncing, so maybe ScriptableObjects are an issue with Mirror?

You can sync ScriptableObject but you most likely don¨’t want to. They are a resource often with pre-defined data so instead just pass the name and load that resource on the clients. See Mirror documentation for more info:
https://mirror-networking.com/docs/Articles/Guides/DataTypes.html#scriptable-objects

Privacy & Terms