Skip to content

Commit

Permalink
Add asset id as an inspector field
Browse files Browse the repository at this point in the history
  • Loading branch information
andybak committed Jul 9, 2024
1 parent 6e43699 commit 6412d68
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Assets/ExampleScripts/HelloPoly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/// <summary>
/// Simple example that loads and displays one asset.
///
///
/// This example requests a specific asset and displays it.
/// </summary>
public class HelloPoly : MonoBehaviour {
Expand All @@ -32,13 +32,15 @@ public class HelloPoly : MonoBehaviour {
//
// This example does not use authentication, so there is no need to fill in a Client ID or Client Secret.

public string assetId = "2Uh3mcX2PHX"; // The asset to load.

// Text where we display the current status.
public Text statusText;

private void Start() {
// Request the asset.
Debug.Log("Requesting asset...");
PolyApi.GetAsset("assets/5vbJ5vildOq", GetAssetCallback);
PolyApi.GetAsset($"assets/{assetId}", GetAssetCallback);
statusText.text = "Requesting...";
}

Expand Down

0 comments on commit 6412d68

Please sign in to comment.