File tree 1 file changed +8
-0
lines changed
Unity/Assets/Ubiq/Samples/Player (XRI + WebXR)/Scripts/Editor
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,11 @@ static void Update()
54
54
PackageManagerHelper . RequireSample ( "com.de-panther.webxr-interactions" , "XR Interaction Toolkit Sample" ) ;
55
55
56
56
#if ! UBIQ_DISABLE_WEBXRAUTOLOADOFF
57
+ var modified = false ;
57
58
var settings = WebXRSettings . GetSettings ( ) ;
58
59
if ( settings != null && settings . AutoLoadWebXRInputSystem )
59
60
{
61
+ modified = true ;
60
62
settings . AutoLoadWebXRInputSystem = false ;
61
63
Debug . Log ( "Ubiq has set AutoLoadWebXRInputSystem to FALSE" +
62
64
" in the WebXR settings. This is to allow you to build" +
@@ -67,6 +69,7 @@ static void Update()
67
69
}
68
70
if ( settings != null && settings . AutoLoadWebXRManager )
69
71
{
72
+ modified = true ;
70
73
settings . AutoLoadWebXRManager = false ;
71
74
Debug . Log ( "Ubiq has set AutoLoadWebXRManager to FALSE" +
72
75
" in the WebXR settings. This is to allow you to build" +
@@ -75,6 +78,11 @@ static void Update()
75
78
" behaviour, add the string UBIQ_DISABLE_WEBXRAUTOLOADOFF" +
76
79
" to your scripting define symbols." ) ;
77
80
}
81
+ if ( modified )
82
+ {
83
+ EditorUtility . SetDirty ( settings ) ;
84
+ AssetDatabase . SaveAssetIfDirty ( settings ) ;
85
+ }
78
86
#endif
79
87
#endif
80
88
You can’t perform that action at this time.
0 commit comments