File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { createElement, PureComponent } from "react";
44import IUnityProps from "../interfaces/unity-props" ;
55import UnityContext from "../models/unity-context" ;
66import UnityLoaderService from "../services/unity-loader-service" ;
7+ import IUnityInstanceParameters from "../interfaces/unity-instance-parameters" ;
78
89export default class Unity extends PureComponent < IUnityProps , { } > {
910 /**
@@ -61,9 +62,13 @@ export default class Unity extends PureComponent<IUnityProps, {}> {
6162 await this . unityLoaderService . load (
6263 this . unityContext . unityConfig . loaderUrl
6364 ) ;
65+ const _unityInstanceParameters : IUnityInstanceParameters = {
66+ ...this . unityContext . unityConfig ,
67+ devicePixelRatio : this . props . devicePixelRatio || undefined ,
68+ } ;
6469 const _unityInstance = await createUnityInstance (
6570 this . htmlCanvasElementReference ! ,
66- this . unityContext . unityConfig ,
71+ _unityInstanceParameters ,
6772 this . onProgress . bind ( this )
6873 ) ;
6974 this . unityContext . setUnityInstance ( _unityInstance ) ;
You can’t perform that action at this time.
0 commit comments