예제 #1
0
    //////////////////////////////////////////////////////////////////////////

    private void RegisterWithContainer()
    {
        GetContainer();

        if (AUIContainer == null)
        {
            Debug.LogError("[Accessibility] Could not find an Accessibility UI Container in any parent object of " + gameObject.name + "! This UI element will be unaccessible.");
            return;
        }

        AUIContainer.CheckForRegister(this);

        UAP_SelectionGroup[] groups = GetComponentsInParent <UAP_SelectionGroup>();
        foreach (UAP_SelectionGroup group in groups)
        {
            group.AddElement(this);
        }
    }
    //////////////////////////////////////////////////////////////////////////

    private void RegisterWithContainer()
    {
        GetContainer();

        if (AUIContainer == null)
        {
            LogErrorNoValidParent();
            return;
        }

        AUIContainer.CheckForRegister(this);

        UAP_SelectionGroup[] groups = GetComponentsInParent <UAP_SelectionGroup>();
        foreach (UAP_SelectionGroup group in groups)
        {
            group.AddElement(this);
        }
    }