> For the complete documentation index, see [llms.txt](https://obvious-game.gitbook.io/soap/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://obvious-game.gitbook.io/soap/scene-documentation/1_scriptablevariables/save-exercise.md).

# Save Exercise

1\_ScriptableVariable

You can set a random color to the player by clicking on the “Random Color” button on the bottom of the screen at runtime.  Currently, the color is not saved. Can you find how to save the player color?&#x20;

Solution 1: find the BindRendererColor.cs component on the prefab\_player ->View.&#x20;

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfKTCLydFH81DHzY2TSKpL6wRuzQm7NXRfuNqguRK4-1c3EQUOB3Cq83QiENz_cnW5QaoT7IQS56t7TY7C7hWJd6LcJK9WTk_28A5aw5yO9Ey6O6JUReOyT3hk7w4jILAm9Ph8YXGvk7osT98EQsTdgw-I?key=ZJq93Y9COvgDvT7H30W5KQ" alt="" width="375"><figcaption></figcaption></figure>

&#x20; Then, expand the Scriptable Variable, enable the “Saved” property and set the default color to white.&#x20;

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdUvR9VnaIsz9RDIR99zDoANPI3ydV30iXBVANmouECxMlgSohwPHmxXw-Hz-4GZbXVf52qAhSv6tlvbBEdtrEIAK3fZRDUiFfpTiPGcStFiI_wwSLWZHZjTsAbV5hZLxdIXZw3mu087O4epCj5_Tpo4Wtw?key=ZJq93Y9COvgDvT7H30W5KQ" alt="" width="375"><figcaption></figcaption></figure>

Solution 2: find the scriptable variable example\_player\_color and enable the “Saved” property.&#x20;

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdc89xs1AQqiWOLFcnoTJRilctSFWe8NzFV29orQGa6W0IJFT5ch069CGUxWS0yI0isR5UbD6VAYjJchaMwVUJ1Ft_Zfvuf1i7CZoA-OcKmnsMZsvW4QwfWbTpq2uZH73fUo7QvivAVwEJECUbRyTbUC0Yr?key=ZJq93Y9COvgDvT7H30W5KQ" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXewOgtvwnuLKRNJtuzt23WouaZfYj5PrLbQCLAbellboPyxW5Kp0W9Rf68NqU6u30ysO8njqBlDtlmqFwV9Khzf3PllA1veQAoRfIUpNlh-CC9M-ERV3-eWbro0apU4fhA8rJrgM58vm9m-qZdwb_Kj0IEa?key=ZJq93Y9COvgDvT7H30W5KQ" alt="" width="375"><figcaption></figcaption></figure>

Note: when you create a new scriptable variable type, you can override the Save and Load method, and have custom save/load for them using Player Prefs 😊. Check the ColorVariable or Vector2Variable to have a concrete example.
