ChangeElementProperties

public void ChangeElementProperties(string elementName, ElementProperties properties);

Description

using UnityEngine;
using Volplane;

public class Demo : VolplaneBehaviour
{
    private VPlayer p;

    void OnConnect(VPlayer player)
    {
        // Store reference to player object
        if(p == null)
            p = player
    }

    void Update()
    {
        // Change element background image on button press
        if(VInput.GetButtonDown(p, "button"))
        {
            ElementProperties properties = new ElementProperties();
            properties.Text = "Hello World!";
            properties.TextAlignment = ElementProperties.Alignment.Center;

            p.ChangeElementProperties("text", properties);
        }
    }
}

Changes multiple properties from an element on the current view at the same time. Use this method for more advanced element manipulation.

 

viewName The name identifier of the element set in the controller editor.
properties The element properties.