UnityLink`
UnityLink`

UnityCameraImage

UnityCameraImage[]

capture an image from the main Unity camera.

UnityCameraImage[camera]

capture an image from the specified Unity camera.

更多信息

  • UnityCameraImage[expr] returns an Image representing the view of a camera in the scene.
  • The following options can be specified:
  • ImageSizeAutomaticdisplay size of the image
    ImageResolutionAutomaticthe resolution of the image
  • UnityCameraImage[All] returns the view of all cameras in the current scene.
  • UnityCameraImage is Listable.

范例

打开所有单元关闭所有单元

基本范例  (2)

Load the Unity Link:

Open a Unity project:

Capture an image from the main camera:

Scope  (4)

Capture an image from the main camera:

Capture an image from a specified camera:

Capture images from all cameras in the current scene:

UnityCameraImage is Listable:

Options  (5)

ImageSize  (2)

Set the displayed size of an image:

Specifying both width and height will add white space if aspect ratios do not match:

ImageResolution  (3)

With ImageResolution -> Automatic, the resolution of the captured image matches the resolution of the Unity Game View:

Set a specific resolution of the captured image:

Specifying both width and height will change what is visible if aspect ratios do not match:

Applications  (2)

Show the Unity Game View in realtime while in Play mode:

Take pictures from different viewpoints in the scene:

Neat Examples  (1)

Show the camera's view with different fields of view:

Wolfram Research (2017),UnityCameraImage,Wolfram 语言函数,https://reference.wolfram.com/language/UnityLink/ref/UnityCameraImage.html.

文本

Wolfram Research (2017),UnityCameraImage,Wolfram 语言函数,https://reference.wolfram.com/language/UnityLink/ref/UnityCameraImage.html.

CMS

Wolfram 语言. 2017. "UnityCameraImage." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/UnityLink/ref/UnityCameraImage.html.

APA

Wolfram 语言. (2017). UnityCameraImage. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/UnityLink/ref/UnityCameraImage.html 年

BibTeX

@misc{reference.wolfram_2022_unitycameraimage, author="Wolfram Research", title="{UnityCameraImage}", year="2017", howpublished="\url{https://reference.wolfram.com/language/UnityLink/ref/UnityCameraImage.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2022_unitycameraimage, organization={Wolfram Research}, title={UnityCameraImage}, year={2017}, url={https://reference.wolfram.com/language/UnityLink/ref/UnityCameraImage.html}, note=[Accessed: 22-November-2024 ]}