Cloth-Behaviour-Simulation
Cloth-Behaviour-Simulation copied to clipboard
Unity 2022 - NuGet can't be loaded
Assembly 'Assets/NuGet/Editor/NugetForUnity.dll' will not be loaded due to errors: Assembly name 'NuGetForUnity' does not match file name 'NugetForUnity'
Also for that reason I guess the array menu won't work at all so I can't add any colliders :(
Hello @MaximilianPs .
Luckily, this has an easy fix. For some reason in the last versions of unity they decided to change the G capital letter in NuGet for Nuget, and thats the source of the error.
The only thing you need to do is to change the name of the dll to its former self. Change the g for a G, as the assembly is expecting. Then you reload unity and everything should work fine.
renaming wont work either. I get the error still even after renaming it. The editor 2020 which you made the asset in I have found made lots of spelling errors. 2020 was a bad year for the editor.
change the editor script to: (This is not as pretty as yours, but at least it works.)
if (b.m_CanCollide) {
EditorGUILayout.HelpBox("Only plane and spheric objects will behave in a proper way. Cubic ones are still being worked on.",MessageType.Info);
b.m_PenaltyStiffness = EditorGUILayout.Slider(new GUIContent("Penalty Stiffness","Controls the power of the penalty force."), b.m_PenaltyStiffness,0f,100f);
b.m_CollisionOffsetDistance= EditorGUILayout.Slider(new GUIContent("Collision Offset","Controls at how much distance from the surface of the collider this force starts to be applied to the mesh. Higher values useful on low res meshes."), b.m_CollisionOffsetDistance,0f,5f);
GameObject tCollider = null;
tCollider = (GameObject)EditorGUILayout.ObjectField("Add Collider here:", tCollider, typeof(GameObject), false);
List<GameObject> Colliders = b.m_CollidingMeshes;
if (tCollider != null)
Colliders.Add(tCollider);
for (int i = 0; i < Colliders.Count; i++)
Colliders[i] = (GameObject)EditorGUILayout.ObjectField($"Collider {i}", Colliders[i], typeof(GameObject), false);
if (Colliders != b.m_CollidingMeshes)
b.m_CollidingMeshes = Colliders;
// EditorGUILayout.PropertyField(collidingSp);
}```
on line 61 of the editor script: EditorGUILayout.PropertyField(collidingSp); Change it to: EditorGUILayout.PropertyField(collidingSp, true); serializedObject.ApplyModifiedProperties();
Fixed.