UNPKG

unity-webgl

Version:

Unity-WebGL provides an easy solution for embedding Unity WebGL builds in your web projects, with two-way communication between your webApp and Unity application with advanced API's.

39 lines (36 loc) 1 kB
import { UnityArguments } from './unity-arguments' /** * Most of the Unity Config's properties are also part of the Unity Arguments. * This type is used to pick the properties that are configurable from the * Unity Arguments. */ type ConfigurableUnityArguments = Pick< UnityArguments, | 'dataUrl' | 'frameworkUrl' | 'codeUrl' | 'workerUrl' | 'streamingAssetsUrl' | 'memoryUrl' | 'symbolsUrl' | 'companyName' | 'productName' | 'productVersion' | 'webglContextAttributes' | 'cacheControl' | 'devicePixelRatio' | 'matchWebGLToCanvasSize' | 'disabledCanvasEvents' | 'autoSyncPersistentDataPath' > /** * The Unity config is provided when instantiating a Unity context. This config * will eventually be used to create the Unity Arguments which will be passed * to the create Unity instance method in order to initialize it. */ export type UnityConfig = ConfigurableUnityArguments & { /** * The url to the build json file generated by Unity. */ readonly loaderUrl: string }