Skip to main content

4. Unity Plugin

Importing Plugins

  1. Extract the plugin installation package for 'YING_Unity_Plugin_XXXX. unitypackage', create a Unity project, click on Assets, and select 'Import package - CustomimPackage...', Import the extracted Unity plugin;
  1. The first time you import, there may be red compilation errors in the log panel. To fix this, open the project properties and set it to allow unsafe code. Check Edit > Project Settings > Player and enable "Allow Unsafe Code" ;

Unity settings and usage

  1. Select "Assets > NOKOV > Scenes > NOKOVExample" in the imported installation package and double-click to open it;
  1. Click on "Client NOKOV" in the Hierarchy panel, modify the Host IP on the right to 10.1.1.198, and select "YING" for Skeleton Naming Convention . If the YING software is playing glove human body data, please select "Xing Ying With Hand" for Skeleton Naming Convention.
  1. Click on "Sapphiart@walk" in the scene. Ensure that the three modules in the Inspector are checked, and that the name of the "Skeleton Asset Name" in "NOKOV Skeleton Animation (Script)" matches the name of the human body in YING . After making modifications, press Enter to save.
  1. Ensure that YING software is in playback mode, then click the playback button in Unity to let the human body in YING move. The model in Unity will then perform synchronous motion .
  1. Switch to the Scene view to observe the model from different angles.

Display of Named and Unnamed Points

  1. In Unity, click on "Client-NOKOV" and check the "Draw Unlabeled Markers" checkbox. Then click the "Play" button at the top of the Unity software, and unnamed points will be displayed in the Unity scene.
  1. Check the "Draw Markers" checkbox, then click the "Play" button, and the named points of the human body will be displayed in the Unity scene.
  1. After expanding "Client-NOKOV," the list will show the IDs of both named and unnamed points. After selecting the ID name of a named or unnamed point from the list, you can view the position of the named or unnamed point in the Unity scene, and the XYZ coordinates of the selected point will be displayed on the right.
  1. Dropdown to Select Scale Ratio, Dropdown to Select Up Axis: Click on "Client-NOKOV," and on the right side, click on "Length Unit" to expand the dropdown and select the scale ratio. You can choose among "meter, Centimeter, Millimeter" for scaling objects in the Unity scene, with the default unit being "Meter." Click on the "Up Axis" option to expand the dropdown box where you can choose the up axis for the Unity scene, with the options being "Y, Z." The default up axis is "Y."