UnityLink`
UnityLink`

CreateUnityAudioSource

CreateUnityAudioSource[obj]

creates a Unity audio source component attached to the UnityGameObject obj.

CreateUnityAudioSource["name"]

creates a Unity audio source component with the specified name.

CreateUnityAudioSource[comp]

generates a copy of the Unity audio source component comp.

更多信息

  • CreateUnityAudioSource returns a UnityAudioSource, and $Failed if it cannot be created.

范例

基本范例  (1)

Load the package and open a project:

Create a Unity audio source component:

Attach the component to a UnityGameObject:

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

文本

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2022_createunityaudiosource, organization={Wolfram Research}, title={CreateUnityAudioSource}, year={2019}, url={https://reference.wolfram.com/language/UnityLink/ref/CreateUnityAudioSource.html}, note=[Accessed: 22-December-2024 ]}