JAMOY1993

Bug When Applying Material To Surfaces

9 posts in this topic

This bug has just recently started happening. If i apply a material to a surface after setting it up and changing its tiling settings the material will be reset to 1.0 1.0. This happens occasionally with materials. Ive tried restarting unity but it doesn't seem to fix anything.


 


Tool: Probuilder Version 2.6.5f0


 


System:


Windows 10 64 Bit


8Gb Ram


Intel I5 3210M 2.5ghz 4 Core


Unity 5.6.0b3


 


Share this post


Link to post
Share on other sites

Hey, I ran into a similar issue - if you apply a material to a probuilder face, make sure that you have the Probuilder tab open and the object selected. If you don't, it resets to whatever material it was previously.  Hopefully we're talking about the same issue! 

karl likes this

Share this post


Link to post
Share on other sites

The issue of material tiling resetting to 1,1 in the original shared material has been causing a lot of trouble so I took some time to work out how to reproduce this.

The problem is specific to the Quick Material property in ProBuilder's Material Editor window.  It can be reproduced by...

1) Highlight a material in Unity Project window.
2) In the Unity Inspector window, change the material's Tiling X Y values in the Shader properties to something other than 1,1 (e.g. 0.2, 0.2).
2) In the ProBuilder Material Editor window add the material to the Quick Material box (by either dragging or browsing).
3) Go back to the Unity Inspector window and focus (click) each of the Tiling X/Y values.  They will revert to 1 immediately because they have already been reset.

Interestingly the values will keep springing back to 1,1 while the material is still in the Quick Material box.  Clearing the Quick Material box allows the Tiling values to be changed again regardless of whether the material is in use by any ProBuilder objects.

The real problem is that using the Quick Material function (as we do all the time as we have a lot of different textures) silently resets the tiling on textures to 1,1.

I hope this is helpful.

James

Share this post


Link to post
Share on other sites

After using PB for a while now I can possibly shed more light relating to both issues here discussed above..

I have found that any texture that is not applied using a Material Editor window "Alt+?" or "Apply" button can be reset to default (or the previously used texture) days or weeks later if the PB object's geometry is changed.  This includes textures that were applied using Quick Material or changed directly in the Mesh Renderer component.

A good example is to make a flat face and texture it using the Mesh Renderer component.  Then close up Unity and reload (whatever) and apply a different texture using the same method.  Close and reload again, select an edge and extrude.  It will either set the default or previous material to the original and extruded faces.

Hope it helps.

 

James

PS.

If you find this information useful all I ask for in return is a shortcut key to open the Vertex Positions Editor window. :)

karl likes this

Share this post


Link to post
Share on other sites
On 4/23/2017 at 6:56 AM, Nicefive said:

If you find this information useful all I ask for in return is a shortcut key to open the Vertex Positions Editor window. :)

Create a new script in a folder named "Editor" and paste the contents in :)

Ex: ( Assets/Editor/OpenVertexColorWindow.cs )

using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using ProBuilder2.EditorCommon;

public class OpenVertexColorWindow : Editor
{
	/**
	 *	Define the shortcut with whatever modifier keys you'd like.
	 * 	https://docs.unity3d.com/ScriptReference/MenuItem.html
	 */
	[MenuItem("Tools/ProBuilder/Editors/Open Vertex Painter %&v")]
	static void MenuOpenVertexColorWindow()
	{
		// Open the preferred vertex color editor.
		pb_Menu_Commands.MenuOpenVertexColorsEditor();

		// Or if you want to be specific about which to open:

		// This opens the toolbar
		// pb_Vertex_Color_Toolbar.MenuOpenWindow();
		// This opens the painter
		// pb_VertexColor_Editor.MenuOpenWindow();
	}
}

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now