Merge pull request #89282 from Rindbee/reduce-indent-in-XRInterface-example-code
Reduce indentation in `XRInterface` class document example code
This commit is contained in:
commit
d6a9a70101
|
@ -122,17 +122,17 @@
|
||||||
[param mode] is the environment blend mode starting with the next frame.
|
[param mode] is the environment blend mode starting with the next frame.
|
||||||
[b]Note:[/b] Not all runtimes support all environment blend modes, so it is important to check this at startup. For example:
|
[b]Note:[/b] Not all runtimes support all environment blend modes, so it is important to check this at startup. For example:
|
||||||
[codeblock]
|
[codeblock]
|
||||||
func _ready():
|
func _ready():
|
||||||
var xr_interface: XRInterface = XRServer.find_interface("OpenXR")
|
var xr_interface: XRInterface = XRServer.find_interface("OpenXR")
|
||||||
if xr_interface and xr_interface.is_initialized():
|
if xr_interface and xr_interface.is_initialized():
|
||||||
var vp: Viewport = get_viewport()
|
var vp: Viewport = get_viewport()
|
||||||
vp.use_xr = true
|
vp.use_xr = true
|
||||||
var acceptable_modes = [ XRInterface.XR_ENV_BLEND_MODE_OPAQUE, XRInterface.XR_ENV_BLEND_MODE_ADDITIVE ]
|
var acceptable_modes = [XRInterface.XR_ENV_BLEND_MODE_OPAQUE, XRInterface.XR_ENV_BLEND_MODE_ADDITIVE]
|
||||||
var modes = xr_interface.get_supported_environment_blend_modes()
|
var modes = xr_interface.get_supported_environment_blend_modes()
|
||||||
for mode in acceptable_modes:
|
for mode in acceptable_modes:
|
||||||
if mode in modes:
|
if mode in modes:
|
||||||
xr_interface.set_environment_blend_mode(mode)
|
xr_interface.set_environment_blend_mode(mode)
|
||||||
break
|
break
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
|
Loading…
Reference in New Issue