public void AddItemElement(string itemName)
    {
        var bufferedDropdownElement = bufferedDropdownElements.GetUnusedPooledObjects(1)[0];

        bufferedDropdownElement.itemName = itemName;

        //UpdateDropdownElements();
    }
        private HierarchyObjectElementV2 CreateHierarchy(HierarchyObjectV2 hierarchyObject, int depthOffset)
        {
            var bufferedHierarchyObject = hierarchyElementArchetypeBuffer[hierarchyObject.bufferedHierarchyType].bufferedHierarchyObjectElements.GetUnusedPooledObjects(1)[0];

            var hierarchyObjectElement = bufferedHierarchyObject.hierarchyObjectElement;

            hierarchyObjectElement.elementName = hierarchyObject.elementName;
            hierarchyObjectElement.bufferedHierarchyObjectElement = bufferedHierarchyObject;
            hierarchyObjectElement.bufferedHierarchyType          = hierarchyObject.bufferedHierarchyType;

            if (hierarchyObject.childrenObjects.Count > 0)
            {
                //identifity the corresponding strucutre, initalise from that strucutre,
                for (int i = 0; i < hierarchyObject.childrenObjects.Count; i++)
                {
                    var childHierarchyObject = CreateHierarchy(hierarchyObject.childrenObjects[i], depthOffset + 1);
                    hierarchyObjectElement.AddHeirarchyElement(childHierarchyObject);
                }

                hierarchyObjectElement.enableArrowElement = true;
            }
            else
            {
                hierarchyObjectElement.enableArrowElement = false;
            }

            hierarchyObjectElement.elementHeight = hierarchyAnimationValues.hierarchyElementsHeight;
            hierarchyObjectElement.AddTabElements(bufferedHierarchyTabElements.GetUnusedPooledObjects(depthOffset));
            //bufferedHierarchyObject.hierarchyObjectElement.ResetHierarchyElement();

            return(hierarchyObjectElement);
        }
 public static void PlayButtonHighlight()
 {
     bufferedAudioSources.GetUnusedPooledObjects(1)[0].PlayOneShot(buttonHighlightClip, Random.Range(0.9f, 1.1f), 1);
 }