Skip to content

Commit

Permalink
Use AssetDatabase.LoadAssetAtPath instead of Resources.Load in Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Dec 14, 2023
1 parent 09dc984 commit 592de1b
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit 592de1b

Please sign in to comment.