Publishing the digital twin
Distributing the Digital Twin to partners, customers and prospects
Last updated
Distributing the Digital Twin to partners, customers and prospects
Last updated
You can run your Digital Twin simulation model in the Unity Editor by clicking the "Play" button. However, this requires the Unity Editor to be installed. Publishing the Digital Twin allows you to share it with customers, partners, and prospects without having the Unity Editor installed or the need of any license. Like publishing a "game".
For publishing you first need to define your build settings. Build settings is opened by File > Build Settings...
In Build settings the destination platform (WebGL, Windows, Linux, Mac, Androi, iOS and so on) and the scene (the model) which should be included into build needs to be defined.
After selecting Build you are asked to define the destination folder of your build.
For some destination platforms you need to install additional packages to your Unity installation.
There are some limitations, specially with some interfaces, for some destination platforms, which are described in Supported Platforms
Please also check Unity Documentation for more information about making a build:
For building on Windows the following settings are recommended in Player Settings.
Mono complies much faster than IL2CPP.
Please also make sure, that Scripting Define Symbols are set as needed for your installation (see Compiler Defines)
WebGL build needs to be done with IL2CPP and the Windows DLLs which are used in some interfaces can't be used any more (and they don't make any sense because only way to communicate from a browser is Websocket). For Building WebGL you need to delete following folders if they are in your project:
CADLink
SpaceNavigator
All Interfaces (besides MQTT and TwinCATHMI - these both are the only ones which are possible with WebGL)
parts4cad
RobotIK
When building to WebGL the rotation of the scene is done with the left mouse button and not the middle mouse button because a Webbrowsers have a different mouse button behavior.
For building to WebGL you need to do the following changes.
Set WebGL in Build Settings:
2. Make sure, that in Plaer Settings Scripting Define Symbols you have the same settings as for Windows (e.g. GAME4AUTOMATION
and GAME4AUTOMATION_PROFESSIONAL
).
3. Disable Auto Graphics API in Player Settings to use exclusively WebGL2 (recommended):
4. In Publishing Settings set Decompression Fallback - this prevents problems with some Webservers.
WebGL builds take sometimes a very long time (up to 1 hour), specially for the first build.
As soon as the build is successfull Unity starts automatically a temporary WebServer and opens your browser with your WebGL build.
For running the WebGL build you need to copy the result of the build (the content of your build folder) to a Webserver.
Enhance your Unity WebGL projects with the realvirtual WebGL Template, offering a full-screen, responsive design for an improved user experience compared to the standard Unity WebGL Template.
Locate Template Files: Find the template files in your Unity project at:
Copy Template Files: Copy these files.
Paste into WebGLTemplates: Paste the copied files into:
Open Unity.
Go to Edit > Project Settings.
In Player settings, find Resolution and Presentation.
Choose the realvirtual template from the "Template" dropdown menu.
Save your changes.
© 2022 in2Sight GmbH https://realvirtual.io - All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including printing, saving, photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.