protected override void Configure()
 {
     if (baseObject == null)
     {
         return; //No base object found, unable to configure
     }
     // Register model events
     targetModel = baseObject.GetComponent <BaseRemoteRenderedModel>();
     targetModel.ModelStateChange += OnModelStateChange;
 }
Exemple #2
0
    protected override void Configure()
    {
        if (baseObject == null)
        {
            return; //No base object found, unable to configure
        }
        // Material controller settings
        baseObject.RevertOnEntityChange = false;
        // Init color palette
        buttonColorReference = new Color[colorButtons.Length];
        // Register color buttons
        for (int c = 0; c < colorButtons.Length; c++)
        {
            int color = c;
            colorButtons[c].OnClick.AddListener(() => ColorButtonInteraction(color));
            buttonColorReference[c] = colorButtons[c].GetComponentInChildren <Renderer>().material.color;
        }

        // Register model events
        targetModel = baseObject.GetComponent <BaseRemoteRenderedModel>();
        targetModel.ModelStateChange += OnModelStateChange;
    }