UnityLink`
UnityLink`

CreateUnityLibrary

CreateUnityLibrary [func,"libname"]

creates a shared library libname from a compiled version of func suitable for use in Unity.

CreateUnityLibrary [namefunc,"libname"]

exports func with the specified name.

CreateUnityLibrary [{func,name1func1,},"libname"]

exports compiled versions of func, func1,.

Details

  • CreateUnityLibrary generates a library suitable for use on the type of computer on which it is run.
  • CreateUnityLibrary creates a library in the directory specified by the current value of $UnityAssetsDirectory.
  • The file created can subsequently be loaded in Unity scripts and applications.

Examples

Basic Examples  (2)

Load the Unity Link:

Open a new Unity project:

Create a random number generator library using RandomReal:

C# script for loading the library and calling the random generator:

Play:

Close Unity:

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

Text

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

BibTeX

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

BibLaTeX

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

CMS

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

APA

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