Ejemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        // checks if the user in the inspector set the m_railGroupGlobalHandle reference to an internal rail slider game object or an unrelated object.
        if (m_railGroupGlobalHandle != null && m_railGroupGlobalHandle.parent.GetComponent <VRBasics_Rail>() == null)
        {
            m_IsGlobalHandleGlobal = true;
        }

        if (onSliderPositionUpdate == null)
        {
            onSliderPositionUpdate = new UnityInteractableValueEvent();
        }


        children = m_railsParent.GetComponentsInChildren <VRBasics_Rail>();

        #if UNITY_EDITOR
        if (!Application.isPlaying)
        {
            return;
        }
#endif
        //m_railGroupGlobalHandle.parent = children[m_currentRail].transform.GetChild(0).GetChild(0);
        ToggleChildren(false);
        calculateGlobalSliderPosition();

        InitSound();
    }