Page 1 of 1

_MainTex Error [SOLVED]

PostPosted: Mon Feb 12, 2018 5:15 pm
by Lars Nonne
Hi,

I'm currently having some issues with my shader.
It's a very complex shader (basically replacing and advancing the standard shader for our company-workflow).
Whenever I click on an object in the scene view that has the shader applied to a material, I get the error:

"Error assigning cubemap texture to 2D texture property '_MainTex': Dimensions must match
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)"
The assigned Texture is a standard 2D texture.

The node _MainTex is created in a shader function, and only allows Texture 2D (I tried changing it to automatic, but that didn't help either). This node then feeds another shader funtion with a Texture 2D input.

Creating a new material doesn't help, too (to eliminate the possibility of old material properties that are causing this).

I should add, that I've written a custom editor, using the TextureWithHDRColor property. But even when I disable the property completely, I still get the error, so I guess that's not the problem.

Versions:
Unity 2017.3.0p2
ASE 1.4.4 (1.4.3 produced the same error, maybe even earlier, I'm not sure)

Any help would be appreciated.
Thanks,
Lars

Re: _MainTex Error

PostPosted: Mon Feb 12, 2018 5:44 pm
by Amplify_Borba
Hello Lars, thank you for getting in touch.

If this issue is related to the same shader of the other post you made regarding an Error Message, it would be best if you could send us the shader at [email protected] as requested in there, so that we could examine both issues in a more timely manner.

Apologies for any inconvenience, please let us know if this is possible.

Re: _MainTex Error

PostPosted: Mon Feb 12, 2018 6:05 pm
by Lars Nonne
After reimporting the shader, the error persist, but (and this is a gamechanger), I noticed, that I get the error on any object, independent of the shader, as soon as I click on it.
This means, the error might actually be in another shader. I will have to investigate on this further to be sure.
For now I'd say you can close this thread, since it might not be an connected to ASE.
Sorry for that.

Thanks,
Lars

PS: the other thread is still valid, since it is clearly connected to your ASE :)

Re: _MainTex Error

PostPosted: Wed Feb 14, 2018 4:51 pm
by Amplify_Borba
Thank you for the additional information and for getting in touch with us via email, we'll continue providing support through there and close this thread.