NotImplementedException: The requested feature is not implemented.

Issue #9 invalid
Former user created an issue

I am using the latest AssimpNet 3.1.1, and Unity3d. And I am getting the following error when loading a fbx file:

NotImplementedException: The requested feature is not implemented. System.Runtime.InteropServices.Marshal.GetHRForLastWin32Error () (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs:412) Assimp.Unmanaged.AssimpLibraryWindowsImplementation.NativeLoadLibrary (System.String path) Assimp.Unmanaged.AssimpLibraryImplementation.LoadAssimpLibrary (System.String path) Assimp.Unmanaged.AssimpLibrary.LoadLibrary () Assimp.Unmanaged.AssimpLibrary.LoadIfNotLoaded () Assimp.Unmanaged.AssimpLibrary.CreatePropertyStore () Assimp.AssimpContext.CreateConfigs () Assimp.AssimpContext.PrepareImport () Assimp.AssimpContext.ImportFile (System.String file, PostProcessSteps postProcessFlags) Loaded.Start () (at Assets/Scripts/Loaded.cs:26)

Below is the C# script:

using System.Collections; using System.Collections.Generic; using UnityEngine; using System.IO; using Assimp; using Assimp.Configs;

public class Loaded : MonoBehaviour {

public string filepath = @"D:/DynamicLoadPOC/10001.fbx"; private Scene m_model;

// Use this for initialization void Start () {

string filename = Path.GetFileName (filepath);
string rootpath = Path.GetDirectoryName (filepath);

Assimp.AssimpContext import = new Assimp.AssimpContext ();

// MeshVertexLimitConfig m = new MeshVertexLimitConfig (65000); // import.SetConfig (m); Assimp.PostProcessSteps flags = (Assimp.PostProcessSteps.OptimizeMeshes | Assimp.PostProcessSteps.OptimizeGraph | Assimp.PostProcessSteps.SortByPrimitiveType | Assimp.PostProcessSteps.SplitLargeMeshes | Assimp.PostProcessSteps.Triangulate);

m_model = import.ImportFile (rootpath + "/" + filename, flags);

if (m_model == null) {
    Debug.Log ("cannot read file");
} else {
    Debug.Log (m_model.MeshCount + "mesh count");
}

} }

Comments (3)

  1. Nicholas Woodfield repo owner

    Make sure that 1) You have a Unity version that can load native libraries (e.g. PRO version) and 2) the native DLL is in a location that can be found -- either you pass in a path to it when initializing the library, or you ensure the native DLL is in the same folder as the managed DLL (this is the default path it tries to load from).

  2. Log in to comment