Created
May 9, 2025 14:35
-
-
Save Priler/63aabbdc21dc7810ebe116df342e9723 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function EnsureStaticObject(objectName, retryInterval) | |
LogMessage(string.format("EnsureStaticObject: %s", objectName)) | |
local objectToFind = nil | |
while not (objectToFind and objectToFind:IsValid()) do | |
LogMessage(string.format("Calling StaticFindObject: %s", objectName)) | |
objectToFind = StaticFindObject(objectName) | |
end | |
LogMessage("EnsureStaticObject Finished") | |
-- Finally return the object | |
return objectToFind | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment