Jump to content

Compile errors on importing SRWorrds SDK


pavel6625

Recommended Posts

When I import Vive-SRWorks-Unity-Plugin.unitypackage, the editor throws me these errors:

Assets\ViveSR\Editor\ReconstructedAssetImporter.cs(24,17): error CS0200: Property or indexer 'ModelImporter.importMaterials' cannot be assigned to -- it is read only

Assets\ViveSR\Editor\ReconstructedAssetImporter.cs(26,17): error CS0619: 'ModelImporter.importMaterials' is obsolete: 'importMaterials has been  removed. Use materialImportMode instead.'

Assets\ViveSR\Editor\ReconstructedAssetImporter.cs(26,17): error CS0200: Property or indexer 'ModelImporter.importMaterials' cannot be assigned to -- it is read only

Assets\ViveSR\Editor\ReconstructedAssetImporter.cs(34,17): error CS0619: 'ModelImporter.importMaterials' is obsolete: 'importMaterials has been  removed. Use materialImportMode instead.'

Assets\ViveSR\Editor\ReconstructedAssetImporter.cs(34,17): error CS0200: Property or indexer 'ModelImporter.importMaterials' cannot be assigned to -- it is read only

Could you tell me what I can do?

I use Unity 2020.3.28f1 LTS.

Link to comment
Share on other sites

In case someone else come across these errors, I switched to Unity 2019.4.35f1 LTS and the errors are gone. Before I was using Unity 2020.3.28f1. 

On Unity 2020 I was making progress by replacing the following lines on the script ReconstructedAssetImporter.cs. I managed to have video pass through but only on the Unity Editor and with other few additional errors. Since I'm just testing and the Unity version is not crucial at the moment for me I switched to and older Unity version.

//importer.optimizeMesh = false;
// quick fix
importer.optimizeMeshPolygons = true;
importer.optimizeMeshVertices = false;

...

//importer.importMaterials = false;
importer.materialImportMode = ModelImporterMaterialImportMode.None;

...
//importer.importMaterials = true;                
importer.materialImportMode = ModelImporterMaterialImportMode.ImportStandard;

 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...