Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotImplementedException: The requested feature is not implemented. #1376

Open
neosca opened this issue Aug 9, 2017 · 2 comments
Open

NotImplementedException: The requested feature is not implemented. #1376

neosca opened this issue Aug 9, 2017 · 2 comments
Labels
Bug Global flag to mark a deviation from expected behaviour

Comments

@neosca
Copy link

neosca commented Aug 9, 2017

I am using the latest AssimpNet.3.3.1 (edited: there was a typo earlier,). 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");
	}

}

}

@kimkulling
Copy link
Member

kimkulling commented Aug 9, 2017 via email

@neosca
Copy link
Author

neosca commented Aug 10, 2017

Sorry I did a typo earlier, I was using the AssimpNet.3.3.1 library. And got the above error, I was able to get the error resolved by following the below thread, and placing the Assimp64.dll in my project folder:
https://forum.unity3d.com/threads/assimp-unity3d-c.182949/

However, than I started getting a null reference error:
"NullReferenceException: Object reference not set to an instance of an object
(wrapper stelemref) object:stelemref (object,intptr,object)"

I did some research and on this thread, someone was able to get rid of that by using 3.0 or 3.2 version:
assimp/assimp-net#30

So, now I am using AssImpNet3.2 and started getting the below error:
"AssimpException: Error importing file: No suitable reader found for the file format of file "D:/DynamicLoadPOC/10001.fbx".
Assimp.AssimpImporter.ImportFile (System.String file, PostProcessSteps postProcessFlags)
Loaded.Start () (at Assets/Scripts/Loaded.cs:29)"

You can download the fbx I am using from the below link:
https://drive.google.com/file/d/0B6Qltc_0EwVGaC1lTWw1LUpIekE/view?usp=sharing

Sorry for troubling you this much, any help is appreciated.
Thanks.

@kimkulling kimkulling added the Bug Global flag to mark a deviation from expected behaviour label Aug 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Global flag to mark a deviation from expected behaviour
Projects
Status: No status
Development

No branches or pull requests

2 participants