File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ "use strict" ;
2+
3+ Object . defineProperty ( exports , "__esModule" , {
4+ value : true
5+ } ) ;
6+ exports . SetFullscreen = SetFullscreen ;
7+
8+ var _Unity = require ( "../components/Unity" ) ;
9+
10+ function SetFullscreen ( isFullscreen ) {
11+ if ( typeof _Unity . UnityInstance !== "undefined" ) {
12+ _Unity . UnityInstance . SetFullscreen ( isFullscreen === true ? 1 : 0 ) ;
13+ } else {
14+ console . warn ( "Wait for Unity to be instantiated before setting fullscreen." ) ;
15+ }
16+ }
Original file line number Diff line number Diff line change 1+ import { UnityInstance } from "../components/Unity" ;
2+
3+ export function SetFullscreen ( isFullscreen ) {
4+ if ( typeof UnityInstance !== "undefined" ) {
5+ UnityInstance . SetFullscreen ( isFullscreen === true ? 1 : 0 ) ;
6+ } else {
7+ console . warn (
8+ `Wait for Unity to be instantiated before setting fullscreen.`
9+ ) ;
10+ }
11+ }
You can’t perform that action at this time.
0 commit comments