News:

Latest addition to the collection: Prefab Maker

Main Menu

Prefab Maker error on Unity 5.4.0f3

Started by jhoooon, August 15, 2016, 06:02:30 AM

Previous topic - Next topic

jhoooon

Hi,

I got an error as following when I open the prefab maker window and selected any object (mesh or any other gameobject).

MissingMethodException: Method not found: 'UnityEditor.ShaderUtil.GetTexDim'.
MeshMakerNamespaces.PrefabMakerOnGUI()

Thanks.

MediaGiant

#1
Hello jhoooon,

I'm not sure why this is happening in this case. To test this I just imported Mesh Maker into Unity 5.4.0f1 and Unity 5.5.0a5 and Prefab Maker worked as expected. There is no mention of ShaderUtil.GetTexDim being deprecated or otherwise changed in the documentation https://docs.unity3d.com/ScriptReference/ShaderUtil.GetTexDim.html

A couple of things to try would be to go to File/Build Settings and ensure you have selected PC, Mac & Linux Standalone. I've experienced strange editor behavior in other build modes. You can also go to Edit/Project Settings/Player and opening the Other Settings area to check that you are using the .Net 2.0 Subset under the Optimization settings.

Lastly could you also try starting a new project, re-importing the package, adding a couple of primitives and combining them as this might shed some more light on the subject. Sometimes other packages import project settings that may be causing this.

A few things to note regarding the usage of the program. Firstly at least one of the models must be textured and the model's textures cannot be tiled (as in a long wall with a repeating texture) and I can't guarantee that the results will be perfect if the models already contain baked lightmaps or atlased textures.

Please let us know if these changes make a difference while I keep brainstorming this.

Regards,
Alan
 


blom

I'm getting the same error as Jahoooon. Actually the error occurs twice for every gameobject selected.

Machine details:
Win7.  C# reports all cultures set to en-US. (I noted that you seem to be calling invoke with the CultureInfo parameter, which I've seen cause issues before) I do have several other language files installed, though not full Windows language support.

Things I've tried:
I tried your settings suggestions. No change.
Tried a new project, same thing.
Thing progressed to try out all of this:  32bit and 64 bit. New projects on both.  I use the VR components on that system, so I tried new install of 5.4.0f3 on another machine (Win8) that doesn't have the VR components installed.  Same result. Complete uninstall and reinstall including flushing of locallow directory. Same result. Removal of all Unity versions and manual deletion of everything I could find Unity. Same result.

-Kris

MediaGiant

Hi Kris,

Thank you for trying all of the solutions you listed. You certainly have tried everything in the book.

I am also running Win7 and ran another test of the program using the same version of Unity (5.4.0f3) and Prefab Maker didn't show the error here. When I do a search on google for any mention of GetTexDim there are only a few pages listed and those are either links to the Unity docs in their various languages and the posts on this forum so this suggests that it is a very obscure problem. On the Unity forum pages (http://forum.unity3d.com/threads/mesh-maker-the-modeling-editing-collection.204606/page-6) there are others using the program so it doesn't appear to be a universal problem. I'm no expert on how Unity works under the hood but after taking a peek at UnityEditor.dll I can see that there is the following code linking to the native C++ side of Unity. This suggests that in some builds this is either being ignored or missed altogether.

    [WrapperlessIcall]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static ShaderUtil.ShaderPropertyTexDim GetTexDim(Shader s, int propertyIdx);

Here is a screenshot of the test results:



In this test I created four objects with both legacy and standard shaders, selected them and was able to create the Test object shown in the hierarchy.

I'm sorry that you, jhoooon and at least one other person on this forum are experiencing this problem. I once had a customer who couldn't see the Mesh Maker window when he clicked on the link in the menu, basically nothing appeared to happen at all. He also tried a lot of the solutions you have tried and finally tracked it down to how the Oculus Rift "screwed with his displays" so after plugging and unplugging the displays he found the window appeared and was orphaned from Unity. After docking it within Unity the problem was fixed but we still don't know exactly why this happened. It may be something equally obscure that is causing this problem but I believe the code is sound and that some other factor is responsible. Perhaps it would be worth checking the UnityEditor.dll at your end to see if the method call is there but I'm frankly at a loss here. If you have any further info please do let me know and if you would like to contact me directly you can write to me at support@meshmaker.com.


Vortavasail

im having this same error as well and this  runtime error comes up as well

MissingMethodException: Method not found: 'UnityEditor.ShaderUtil.GetTexDim'.
MeshMakerNamespace.PrefabMaker.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

oblix

GetTexDim error aswell. I've tried Unity 5.4.0f3 and beta Unity 5.4 , I'll download Unity 5 now but its not looking good by the looks of others that have this error. My entire console error contains :

MissingMethodException: Method not found: 'UnityEditor.ShaderUtil.GetTexDim'.
MeshMakerNamespace.PrefabMaker.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)


MediaGiant

#6
I have been working on this and unfortunately cannot find the cause. Kris and I worked through a few trials and different scenarios to see what worked and in the end the best solution is to keep a copy of Unity version 5.3.6 around as this was the last version that didn't show a problem with Prefab Maker.

I have used the program in Unity 5.5 and it worked here but there seems to be a DLL conflict or mismatch that is responsible. In the next update I will link to the most recent Unity DLLs to ensure this is fixed.

Regards,
Alan

MediaGiant

A new version of Mesh Maker and Prefab Maker have now been submitted to the store for review. They have been linked to the 5.4.0 DLLs and should work as normal now.

I've had to drop support for the earlier versions but I'm sure most people will be keeping up with the latest version of Unity.

Please give it a few days for the store to process and then grab the updated package. Thank you for your patience and understanding.

Best regards,
Alan