After releasing Cesium for Unity v1.7.0, I did a final test with a clean Cesium for Unity Samples project, and found no Cesium ion assets could load because the project default token was blank. And in fact, Unity had modified the ion.cesium.com.asset file to remove the token. If I set the token again, it would be remembered. But this seemed to happen via modification to non-committed files in the Library directory, so I couldn't make the Samples project work out of the box. 🤕
Though I can't completely explain it, the problem appeared to be that Resources.Load<CesiumIonServer>("CesiumIonServers/ion.cesium.com") was returning null the first time, even though the asset file existed on disk. CesiumRuntimeSettings uses an alternate method to load an asset in the Editor (AssetDatabase.LoadAssetAtPath), and I guess I just learned why. After making CesiumIonServer do the same, the problem goes away. So that's what this PR does, and here comes v1.7.1.
After releasing Cesium for Unity v1.7.0, I did a final test with a clean Cesium for Unity Samples project, and found no Cesium ion assets could load because the project default token was blank. And in fact, Unity had modified the
ion.cesium.com.asset
file to remove the token. If I set the token again, it would be remembered. But this seemed to happen via modification to non-committed files in the Library directory, so I couldn't make the Samples project work out of the box. 🤕Though I can't completely explain it, the problem appeared to be that
Resources.Load<CesiumIonServer>("CesiumIonServers/ion.cesium.com")
was returning null the first time, even though the asset file existed on disk.CesiumRuntimeSettings
uses an alternate method to load an asset in the Editor (AssetDatabase.LoadAssetAtPath
), and I guess I just learned why. After makingCesiumIonServer
do the same, the problem goes away. So that's what this PR does, and here comes v1.7.1.