I have a script manager with a list. The script manager has a “hash tree” function which looks for a specific entry in the list. Multiple other objects can access the script manager and tell it to insert data into the list. In what order does Unity process things? If “Cube” tells the script manager “put me in the list” script manager starts searching the list and finds where cube belongs so the list is always in order. But “Sphere” also wants in the list and is going to tell script manager in the same frame that he wants in the list as well so it’s going to call the same function to start searching for where Sphere goes on the list.
Is it possible for “Cube” to be added to the list while the script manager is still searching for “Sphere’s” place in the list? Both Cube and Sphere directly access the “script manager” and script by its object reference and access a function in that script called register. I.E. both Cube and Sphere call a search and add function. If Cube calls it first, is it possible for Cube to arrive at the “add me here” part of the function while Sphere is mid-way through searching the list?
Or, is it only possible for one function to be run at a time?