Search Unity

Develop Unity Plugins

Discussion in 'Formats & External Tools' started by Diego Colombo, Apr 29, 2007.

  1. Diego Colombo

    Diego Colombo

    Joined:
    Aug 24, 2006
    Posts:
    3
    Hallo!
    Maybe that's not hte righr place to ask .. but ... help me :D
    I need to load some custom file in unity and and build a custom representation fr the object.
    ok ok ..
    An example: i want to load data like heightmaps (plus infos about buildings on that) and i want to build a 3D model which is going to be serialized (and deserialized) using camera info (think about a quadtree were i want to guess what to load next.
    I would like to extend the way Unitydeals with the asset and how it build the asset (something similarto the xna content pipeline). Does anyone have any input for me (what i should read, which license i need, and so on) I have seen the plugin documentation in the unity manual ... something that seems simple but the documentation is quite poor, i don't understand when it's fired, how to intercept assets import, etc etc ... HELP!!


    Diego Colombo
    R&D Engine developer Milestone
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    A mesh importer you wouldnt want to write as a plugin. Instead you would write it in C# using the mesh interface and gameobjects and transorms to create hierarchical objects. The mesh interface can be found here:
    http://unity3d.com/Documentation/ScriptReference/Mesh.html

    Also see the procedural example project www.otee.dk/examples for a bunch of examples creating and modifying meshes at runtime.

    Right now you cant intercept the asset pipeline directly. But its something to be extended in the future.

    However you can either do importing at load time or store your imported data in the scene. This happens automatically if you create objects in edit mode eg. through a custom menu item.

    http://unity3d.com/Documentation/ScriptReference/MenuItem.html