Used for "map-object" and "asset-list" types to allow the list to be filtered before display. This gives the script an opportunity to cull any inappropriate values (such as those already added) and/or add any custom entries (such as a "none" selection).
C#
public bool FilterPropertyElementList(string propertyID, GSObject[] listObjects, string[] listNames)
{
if (propertyID == "object-list")
{
bool bDidChangeAnything = false;
// Remove any already added objects from the list
int i;
for (i = 0; i < listObjects.size(); )
{
if (IsAlreadyInList(cast<GameObject>(listObjects[i])))
{
listObjects[i,i+1] = null;
listNames[i,i+1] = null;
bDidChangeAnything = true;
}
else
{
++i;
}
}
return bDidChangeAnything;
}
return inherited(propertyID, listObjects, listNames);
}
Display More