void SetupLayout(int _index)
    {
        if (_index >= m_layoutData.Count || m_layoutData == null)
        {
            return;
        }

        for (var i = 0; i < m_cameraRoot.transform.childCount; i++)
        {
            m_cameraRoot.transform.GetChild(i).gameObject.SetActive(false);
        }

        for (var i = 0; i < m_layoutRoot.transform.childCount; i++)
        {
            m_layoutRoot.transform.GetChild(i).GetComponent <CanvasGroup>().alpha = 0;
        }

        LayoutSource _s = m_layoutData[_index];

        _s.m_canvasGroup.alpha = 1;
        for (var i = 0; i < _s.m_cameras.Length; i++)
        {
            _s.m_cameras[i].SetActive(true);
        }
    }
示例#2
0
        /// <summary>
        ///     Creates a new instance of the <see cref="ArtemisLayout" /> class
        /// </summary>
        /// <param name="filePath">The path of the layout XML file</param>
        /// <param name="source">The source from where this layout is being loaded</param>
        public ArtemisLayout(string filePath, LayoutSource source)
        {
            FilePath = filePath;
            Source   = source;
            Leds     = new List <ArtemisLedLayout>();

            LoadLayout();
        }