In my game I am making use of RunService:BindToRenderStep, but while messing around with it, I found that UnbindFromRenderStep doesn’t raise an error when called on a non-existent function, even though it says otherwise on the dev wiki?
These two seperate code samples should raise this error, but do not.
local RunService = game:GetService("RunService")
RunService:UnbindFromRenderStep("f")
RunService:BindToRenderStep("t", 2, function()
RunService:UnbindFromRenderStep("t")
end)
wait(1)
RunService:UnbindFromRenderStep("t")
Does anyone know why this is? I’m using UnbindFromRenderStepped in different threads so I’m afraid in some cases I will call it on an already unbound function, and I want to make sure this doesn’t raise an error.
I could use pcall but I don’t want to do that either if I don’t have to.