# SDK Update Guide

### **General Updates**

* After an sdk upgrade a bake process will be initiated automatically by the sdk to make sure the baked scripts are up to date.
* If you run into any compilation or runtime errors in coherence code after the update these steps might help resolve the issue:

1\) Go to coherence -> Schema and Baking -> Bake schemas (Safe Mode)

This will generate baked skeleton scripts which will compile but not work at runtime.

![](https://lh4.googleusercontent.com/Nsnvd5WHebrGbVStBkr-FZnnx7_AhaOXcC8mb4_o2TcusE7KuB7ISvW5nZYPkR4aIXyTqOV2y66rOm-rroV_QFikmnHVAekF1z17KzKR6dXqyGrw0eM1XExovzyWAJTpe_Preuqh)

&#x20;2\) Go to coherence -> Schema and Baking -> Bake schemas

To fully generate the baked code (This can also be done via any of the other baking  options).

![](https://lh5.googleusercontent.com/WGFdmYblkisGvtJwgcXb2QkSHMf9bQ4eaOCZUMb3FFzteVpJ1WYJc16lgCGeg8FckhIXQ8hldQ5bN1DFhyUsroHUeaOaTJpSTLr8bHLjjWQQGXSiRqrAZ9i9B1Q9Q6Z4f_JVD8ul)

3\) This process should handle old bindings which are different on the updated version. If the errors persist check the bindings window for the relevant prefab to make sure they are set up properly then perform steps 1 and 2 again.\ <br>

### **SDK Upgrade 0.4.x -> 0.5.0**

* Notable api changes you should be aware of:

&#x20;      commands are now called like so:

`sync.SendCommand<ComponentType>("CommandMethodName", MessageTarget.All);`

For example:

![](https://lh6.googleusercontent.com/6O_6gifmd3n3nxqO8HxQ__oNUVvupIIv3U1mCZN2cr2LwoaHRHb9LC7lWR7-6Tbye4cUdkOQXpCEd4J-44pNBf0xseKB2pGNj9Vz6OmucE_k3TB67iNBBQbA2qPFkFujOKI_QcQp)

* Notice the MessageTarget parameter and generic type argument which might be missing in the version you were using before.

Method parameters should be added after the MessageTarget parameter.

* Notice the MessageTarget must be set for command methods in the Bindings window as well. If this is not set up in accordance with the way the method is called at runtime the command will not go through and a warning will be given about improper routing.

![](https://lh4.googleusercontent.com/r-DP3w1mZXlnlFdcI_SFfLfoq5HRrb8wU2s_OMjOTkD2m7Zax0SKOu4UixWdEygAiARvQV9Jhl-aSLRbsApKTYDCLA3PDWhRAYgQZ7p6wiBHKAxup1e9GG0DCEqaOQPxjwcdXG-E)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.coherence.io/0.5.2/resources/sdk-update-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
