JT Unity Plugin for JT Open Program members

The JT Unity Plugin is a new tool for JT Open Program members. With the JT Unity plugin developers can dynamically load .jt files into a Unity game while the game is running. The plugin also supports creation of JT Prefabs that can abe dynamiclly loaded or packaged with the app.

The JT for Unity plugin is a Unity Custom Package consisting of C# scripts and plugin libraries that allows users to load native JT files in applications created with Unity. The plugin extracts product structure, tessellated geometry representations, tessellated PMI representations and properties directly from a .jt file into a Unity scene. The plugin also creates a mesh collider from the Mesh attached to the JTModelLoader enabled GameObject.

The JT for Unity plugin supports two options for working with JT content;



  1. Dynamic loading of a .jt into an active Unity application. In this scenario the JT file is loaded from disk when the application is launched. The JT content remains in its native form on disk. For more information see the “Loading JT Content” section in the user documentatoin. Dynamic loading only works in applications created for the Windows desktop and Windows UWP platforms.

  2. Creation of Prefabs. JT models loaded into an active scene using the dynamic load capability can be saved as Prefabs using the provided scripts. Prefabs created with the JT for Unity plugin have additional information associated with them that is not available when using the built in Unity Prefab creation feature. These Prefabs can be used in Unity applications on any platform. Prefabs created with the plugin must be included at compile time.


Because the JT for Unity plugin makes use of the JT Open Toolkit to extract content from .jt files, the plugin must be enabled with a valid JT Open Toolkit license key when using the JTLoader and JTLoaderLogger scripts.

(view in My Videos)

Comments

11 thoughts about “JT Unity Plugin for JT Open Program members
  • Hi zinkm,

     

    not able to find the Unity plugin package in JT Open Toolkit trail package. Downloaded from your reference link.

    is there any documentation about it?

     

     

  • Hi @zinkm 

     

    Does the JT for Unity toolkit also support reading PLM XML files and their data? 

     

    Sorry if this is an elementary question – I’m only getting started with JT and PLM XML.

     

    Cheers!

  • Hi, very nice plugin! But i have a problem in Unity 2019.1.3f1… If i try to import a model, i get an Missing Method Exception for bool UnityEngine.Texture2D.LoadImage(byte[]) Is this an well known problem and do you have an solution for that? With Unity 5.6, it works fine…

  • The model is only partially loaded, not fully loaded.
    I used JTTK105_JTUtils125_JTUnityPlugin1_3.
    As an example, I took the scene “JT Scene 1 model” and for “JT File Settings > Path To Load” set “butterflyvalve.jt”.

    The following components did not load:
    1. valve_sub_assy > screw_5_x_375
    2. valve_body_sub_assy > screw_10_x_75

    I generated JSON using jt2bod.exe.
    Now look at both screws.

    {
    “title”: “screw_5_x_375”,
    “psId”: 226,
    “xform”: [ 1, 0, 0, 0, 0, 1, 0, -1, 0, 0, -0.0645, -0.8125 ],
    “children”: [
    {
    “title”: “screw_5_x_375_SOLID_SOLIDS”,
    “b64data”: “UExNQk9ECABTQcIHAAAAAAAAA….”,
    “psId”: 237
    }
    ]
    },

    {
    “title”: “screw_5_x_375”,
    “psId”: 320,
    “instanceId”: 226,
    “xform”: [ 1, 0, 0, 0, 0, 1, 0, -1, 0, 0, -0.0645, -1.8125 ]
    }

    There is a node “children” for the screw with coordinates (0, -0.0645, -0.8125) . Inside this node, a body is defined in the b64data field.
    There is no node “children” for the screw with coordinates (0, -0.0645, -0.8125). And there is only a link to the instance “instanceID: 226”.
    For the first screw: “psId: 226”.

    I think the problem is inside JTParser.dll. Maybe he does not know how to work with component instances (where instanceID is used instead of b64data)?

  • This plugin works very well with the 2017 version of Unity. But with the 2019 version it doesn’t matter how it should. Better support is expected for the Unity 2019 version?

Leave a Reply

This article first appeared on the Siemens Digital Industries Software blog at https://blogs.sw.siemens.com/jt-open/jt-unity-plugin-for-jt-open-program-members/