Set Resource ========================== .. code-block:: csharp public void SetResource(string id, int amount) Directly sets the player's amount of the resource identified by ``id`` to ``amount`` (clamped between 0 and the max resource amount from ``GameSettings``). Fires the ``ResourceChanged`` event. ``AddResource``/``SpendResource`` are built on top of this method.