David Catuhe 4 vuotta sitten
vanhempi
commit
fb3af1c83c

+ 7 - 1
Playground/src/components/commandBarComponent.tsx

@@ -143,7 +143,13 @@ export class CommandBarComponent extends React.Component<ICommandBarComponentPro
                     {
                         label: "QR code",
                         onClick: () => {this.props.globalState.onQRCodeRequiredObservable.notifyObservers(true)}
-                    }
+                    },                 
+                    {
+                        label: "Load Unity Toolkit",
+                        storeKey: "unity-toolkit",
+                        defaultValue: false,
+                        onCheck: () => {}
+                    }, 
                 ]}/>
                 </div>
                 <div className="commands-right">

+ 1 - 1
Playground/src/components/rendererComponent.tsx

@@ -125,7 +125,7 @@ export class RenderingComponent extends React.Component<IRenderingComponentProps
             }
 
             // Check for Unity Toolkit
-            if (location.href.indexOf("UnityToolkit") !== -1 && !this._unityToolkitWasLoaded) {
+            if ((location.href.indexOf("UnityToolkit") !== -1 || Utilities.ReadBoolFromStore("unity-toolkit", false)) && !this._unityToolkitWasLoaded) {
                 await this._loadScriptAsync("https://raw.githubusercontent.com/MackeyK24/MackeyK24.github.io/master/toolkit/babylon.manager.js");
                 this._unityToolkitWasLoaded = true;
             }