From 6412d6884ffdcb9a719ae36aa61720e085e56e2a Mon Sep 17 00:00:00 2001 From: Andy Baker Date: Tue, 9 Jul 2024 17:09:11 +0100 Subject: [PATCH] Add asset id as an inspector field --- Assets/ExampleScripts/HelloPoly.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Assets/ExampleScripts/HelloPoly.cs b/Assets/ExampleScripts/HelloPoly.cs index 2b9629e..c278c79 100644 --- a/Assets/ExampleScripts/HelloPoly.cs +++ b/Assets/ExampleScripts/HelloPoly.cs @@ -19,7 +19,7 @@ /// /// Simple example that loads and displays one asset. -/// +/// /// This example requests a specific asset and displays it. /// public class HelloPoly : MonoBehaviour { @@ -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..."; }