Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle possibility of a null token in the SelectIonTokenWindow #501

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

##### Fixes :wrench:

- Fixed a bug that prevented using the Token panel with a new Cesium ion Server that had never had its token set before.
- Fixed a bug that could cause a crash in `CesiumIonSession` when the object was garbage collected or the AppDomain was unloaded while network requests were in progress.
- Fixed a bug that could cause `CesiumFlyToController` to unexpectedly interrupt a flight.
- glTF `doubleSided` materials are now supported. Previously, models using this property would appear inside-out.
Expand Down
2 changes: 1 addition & 1 deletion Editor/SelectIonTokenWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private void OnGUI()
// The source will be set to "UseExisting" later by RefreshTokens
// if the _specifiedToken is from the currently signed-in ion account.
this._source = IonTokenSource.Specify;
if (this._specifiedToken.Length == 0 && session.IsConnected())
if (string.IsNullOrEmpty(this._specifiedToken) && session.IsConnected())
{
this._source = IonTokenSource.Create;
}
Expand Down
4 changes: 2 additions & 2 deletions Runtime/CesiumIonServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ public class CesiumIonServer : ScriptableObject
/// found by searching the logged-in Cesium ion account for the
/// DefaultIonAccessToken.
/// </summary>
public string defaultIonAccessTokenId;
public string defaultIonAccessTokenId = "";

/// <summary>
/// The default token used to access Cesium ion assets at runtime. This token
/// is embedded in packaged games for use at runtime.
/// </summary>
public string defaultIonAccessToken;
public string defaultIonAccessToken = "";

// The server URL for which we are currently attempting to deduce an API URL. When this property
// is null, we're not currently loading a config.json in order to deduce an API URL for the server.
Expand Down
Loading