|
AsImpL 1.0
Asynchronous Importer and run-time Loader for Unity
|
Requires Unity 5.5.4 or higher.
Load 3D models (currently only OBJ) into Unity scene, both at run-time and in Editor mode, importing them into unity project as assets. To exploit the same features implemented in the run-time loader it can also be used as asset importer (a prefab with its dependencies is created in the project).
3D models can be loaded both from files and from URLs. 
Some improvements are made in OBJ import compared with the current version of Unity:


This project was started because of these requirements (partly addressed by some existing projects):
A menu AsImpL is added to the Unity Editor main menu, with a sub-menu Import OBJ model that opens a window. In this window you can set paths and import settings, then you can press Import to start importing the selected model. A progress bar shows the import progress and phase until the model has been loaded (or until you press Cancel to abort the process). A utility menu item Capture screenshot was added to take a screenshot, the file is named automatically and saved into the main project folder, then the folder is opened in your file manager.
A sub-menu Import OBJ model [AsImpL] is added to the Unity Editor Asset menu. It opens a window where you can set paths and import settings, then you can press Import to start importing the selected model. A progress bar shows the import progress and phase until the model has been loaded (or until you press Cancel to abort the process). To the Window menu a sub-menu item Capture screenshot [AsImpL] is added to take a screenshot, the file is named automatically and saved into the main project folder, then the folder is opened in your file manager.
An example scene is provided to demonstrate how the importer can be connected to a UI and extended with new features.
The code in this project should be prepared to be extended for supporting other file formats. Even if the only supported format is currently OBJ, the idea is to create a common framework on which the support for other formats could be developed, allowing the exchange of data with other applications.
The import process is divided into separate phases:
To load some OBJ files you can add a ObjectImporter to a game object and call its ImportModelAsync() method from a MonoBehavior, see 001_Import_SimpleTest example scene in Assets/AsImpL/Examples, where you can find also a more advanced example in 002_Import_CustomImporter.
This work started looking at the Runtime OBJ Loader, from which some source code (in particular TextureLoader.cs and parts of LoaderObj) came. The OBJ format loader is inspired by Runtime OBJ Loader, unity-obj-loader, unity-remote-obj-loader and all the people who shared their ideas (e.g. Bartek Drozdz). The first asynchronous loading implementation comes from unity-remote-obj-loader. Thanks in advance to all the people who contributed and will contribute in any way to this project.
Code released under the MIT License.
This is on GitHub.