UnityLink`
UnityLink`

UnityCurrentValue

UnityCurrentValue[item]

gives the current value of item in the Unity editor and engine.

Details

  • Values for appropriate items can be set using UnityCurrentValue[item]=val.
  • Possible items that can be used in UnityCurrentValue include:
  • "Playing"True if Unity is in Play mode
    "Paused"True if Unity is paused
    "ActiveScene"the current active scene
    "OpenScenes"a list of currently open scenes

Examples

Basic Examples  (2)

Load the UnityLink:

Open a Unity project:

Get the Play mode of the Unity editor:

Set the Play mode to be True:

Wolfram Research (2019), UnityCurrentValue, Wolfram Language function, https://reference.wolfram.com/language/UnityLink/ref/UnityCurrentValue.html.

Text

Wolfram Research (2019), UnityCurrentValue, Wolfram Language function, https://reference.wolfram.com/language/UnityLink/ref/UnityCurrentValue.html.

BibTeX

@misc{reference.wolfram_2020_unitycurrentvalue, author="Wolfram Research", title="{UnityCurrentValue}", year="2019", howpublished="\url{https://reference.wolfram.com/language/UnityLink/ref/UnityCurrentValue.html}", note=[Accessed: 19-April-2021 ]}

BibLaTeX

@online{reference.wolfram_2020_unitycurrentvalue, organization={Wolfram Research}, title={UnityCurrentValue}, year={2019}, url={https://reference.wolfram.com/language/UnityLink/ref/UnityCurrentValue.html}, note=[Accessed: 19-April-2021 ]}

CMS

Wolfram Language. 2019. "UnityCurrentValue." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/UnityLink/ref/UnityCurrentValue.html.

APA

Wolfram Language. (2019). UnityCurrentValue. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/UnityLink/ref/UnityCurrentValue.html