Closed dblatner closed 3 years ago
I don't know how to reproduce the problem. Please tell me the details 👀
@ousttrue : steps for reproduction:
-> Unity shows an error in the console similar to this
error CS0012: The type 'SubAssetKey' is defined in an assembly that is not referenced. You must add a reference to assembly 'VRMShaders.GLTF.IO.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
Then, if you set VRMshaders assembly definition file "autoReference", Unity will work with UniGLTF/VRMshaders as expected.
Most of the time, "autoReference" should be enabled on asmdef files.
Thanks your description!
For the clean code design, we use the Assembly Definition and disallow the Auto Referenced
property explicitly.
You need to use the Assembly Definition file in your own code.
refs: https://docs.unity3d.com/2019.4/Documentation/Manual/ScriptCompilationAssemblyDefinitionFiles.htm
It seems too advanced to force everyone to use asmdef. :exploding_head:
I also think asmdef is useful, but I think autoReference=true
is better because it gives the choice to use or not use asmdef.
Some asmdef files has been set Auto Referenced
true
since v0.79.0 !
VRMShader assembly definition file needs to set "autoReference" property to "true" .
Otherwise, when importing UniGLTF/VRMShaders as UPM package, Unity throws an error that type references are missing. (e.g. when using gltfExporter.Export(...) method).
I checked latest pre-release version 0.75 .
Should be a very quick fix :-)