Configurator project template

Have a look at my configurator project template.

My idea was to mark some materials in the scene and make them configurable by user.
I guess there are many product configurators are based on this idea. I think product configurators are one of typical non-game uses of Unity, but I haven’t seen any template on the AssetStore or anywhere else yet.

The template used for this demo enables user to create custom texture palette based on uploaded images. Thanks to new advances in webgl and browsers technology the file uploads has now become easy and can be done through opening the system file dialog or drag&drop.

This could be particularly useful for exhibithion walls and stands, where client could see his own graphics placed on the product.

Generally the template should include some configuration options for the materials in Unity, like texture collections. (I mean some set of textures for the floor, other for the walls etc.) In this case I have concentrated on the uploads palette only. You can also setup in Editor the active materials as unique or shared, i. e. whether the app should create a unique material instance for each material occurence in the scene, or use shared material for all occurences.

The texture change on object issues the callback used by reflection probe manager to rebake reflection maps. It is just the purpose of the metallic boxes to illustrate that.
2905657--214035--Zrzut ekranu (68).png
I just wonder whether that could be useful on the AssetStore.
I would just be very grateful for any feedback or suggestions on that.
Obviously the full version should include multiple palettes (not uploads only) and save/load functionality, this demo here would be just a start.
Demo link here.

Looks great! I PM’d you

Hi i need to develop a product configurator that displays the bag and its internal view. Can you guide me how to develop? (Am new to Unity)

I need something like this

This is a trivial case.
I guess it is a mesh with 6 submeshes.
You have just 6 materials, one material per submesh.
The materials share the same common properties, only the tint colors are different.
You have a vertical selection grid to select the material and you have a horizontal selection grid to set color for the selected material and that’s all.

BTW. I have also started another thread on even more advanced configurator, if anyone is interested it is here:
https://forum.unity3d.com/threads/maybe-a-webgl-app-template-texture-configurator.488944/

1 Like

Is it possible for you to share the code to me, since am new to unity I don’t have basic code structure.

It’s a very, very simple script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class VerySimpleConfigurator : MonoBehaviour
{
    private Material selectedMaterial;

    public Material[] colourableMaterials;  //put GameObject materials here

    public Color[] colors;  //put colors here
    void Start () {
       
    }

    public void SelectMaterial (int i) {
        selectedMaterial = colourableMaterials[i];
    }
    public void SetColor(int i)
    {
        selectedMaterial.color = colors[i];
    }
}

You will only need to tie the GUI buttons to that.

The recent version of this project can be seen here:

and online:
http://virtualplayground.d2.pl/stoiskaStandard/galleries/

Hi @tomekkie2 , i follow the way you did but come out with some errors. Can you explain the meaning of private class that you insert for material? Also, is it possible to insert GameObject array like you did for material and colour?

NullReferenceException: Object reference not set to an instance of an object
ColourConfigurator.SetColor (Int32 i) (at Assets/Scripts/ColourConfigurator.cs:22)

Below is my script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ColourConfigurator : MonoBehaviour
{
    private Material selectedMaterial;
    public Material[] colourableMaterials;
    public Color[] colors = { Color.red, Color.blue, Color.green, Color.yellow };  //put colors here
    void Start()
    {
 
    }

    public void SelectMaterial(int i)
    {
        selectedMaterial = colourableMaterials[i];
    }

    public void SetColor(int i)
    {
        selectedMaterial.color = colors[i];
    }
}