Skip to content

Commit

Permalink
Merge pull request #387 from CesiumGS/find-server-better
Browse files Browse the repository at this point in the history
Use AssetDatabase.LoadAssetAtPath instead of Resources.Load in Editor
  • Loading branch information
kring authored Dec 14, 2023
2 parents 09dc984 + 7606c4a commit caf2554
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

### v1.7.1 - 2023-12-14

##### Fixes :wrench:

- Fixed a bug that prevented the default `CesiumIonServer` asset from remembering its token in a clean project.

### v1.7.0 - 2023-12-14

##### Additions :tada:
Expand Down
6 changes: 6 additions & 0 deletions Runtime/CesiumIonServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ public static CesiumIonServer defaultServer
{
get
{
#if UNITY_EDITOR
CesiumIonServer result = AssetDatabase.LoadAssetAtPath(
"Assets/CesiumSettings/Resources/CesiumIonServers/ion.cesium.com.asset",
typeof(CesiumIonServer)) as CesiumIonServer;
#else
CesiumIonServer result = Resources.Load<CesiumIonServer>("CesiumIonServers/ion.cesium.com");
#endif

#if UNITY_EDITOR
if (result == null)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.cesium.unity",
"version": "1.7.0",
"version": "1.7.1",
"displayName": "Cesium for Unity",
"description": "Cesium for Unity brings the 3D geospatial ecosystem to Unity. By combining a high-accuracy full-scale WGS84 globe, open APIs and open standards for spatial indexing such as 3D Tiles, and cloud-based real-world content from [Cesium ion](https://cesium.com/cesium-ion) with Unity, this plugin enables 3D geospatial workflows and applications in Unity.",
"license": "Apache-2.0",
Expand Down

0 comments on commit caf2554

Please sign in to comment.