Importer throwing errors in Unity?
Hey y'all, I've been trying to import a Gen-8 character for use in Unity (facial animation of an avatar), but every time I import it using the bridge I get the following errors in console:
The type or namespace name 'ScriptedImporter' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'ScriptedImporterAttribute' could not be found (are you missing a using directive or an assembly reference?)
Obviously this is telling me that this particular namespace doesn't exist in the project, but I've found no other solution online that offer a fix to this problem. It prevents my project from being played or recompiling since there are errors in the scripts. What exactly causes this and how can I go about troubleshooting it? I have tried:
-Restarting Unity
-Reimporting
-Exporting the model without Morphs and with Morphs
-Using URP compared to the Standard rendering pipeline
-Doing it on a clean project
Any help would be appreciated, thank you!
Comments
You are using a version of Unity greater than Unity 2019. The first time you install the DazToUnity software into your Unity project via the "Install Unity Files" checkbox, it will ask you to update the script API and offers you some unclear choices like "I've Made a Backup. Go Ahead" and "No Thanks." If you click "No Thanks" then the DazToUnity scripts will not work and you will get the errors above. Here is the solution:
1. If you are using Unity 2020, then click "Asset" on the main menu, and select the "Run API Updater..." option which is near the bottom half of the menu. When you get the dialog prompt about "API Update Required", click the long button that says, "I Made a Backup. Go Ahead!" Do NOT click "No Thanks".
2. If you are using Unity 2021 or above, then right-click on the "Daz3D" folder of your Project Pane. In the pop-up menu, select "Reimport". When you get the dialog prompt about "Script Updating Consent", click "Yes, for these and other files that might be found later" or "Yes, just for these files". Do NOT click "No".
NOTE: You mentioned running URP and the standard / built-in rendering pipeline. The official DazToUnity bridge currently supports HDRP only. If you want to use URP or built-in rendering pipeline, I suggest you install the unofficial DazToUnity plugin: https://www.daz3d.com/forums/discussion/529086/released-unofficial-dtu-bridge-v1-2-2021-10-31/p1
Good luck.
Hey Daniel!
I wasn't able to try your solution since the problem has gotten significantly worse since I worked on it yesterday! Now importing the model to Unity through the bridge or manually just causes Unity to instantly crash before the project even opens. It claims some file in the export is corrupted, and needs to be 'removed' before continuing. There is no information as to what this file comes from or what it's supposed to be. Is this a common side effect? Am I doing something wrong that you know of?
Thanks for the support!