RunService - Is there a method to find the current Binds?

I’m trying to find every string thats bound to the RunService; similair to the GetAllBoundActionInfo found in the Context Action Service.

Currently theres a bug where the camera isn’t being updated correctly; The bug is present intermittently during play and while I’ve encountered it myself, I’m unable to reliably reproduce it. The camera is bound upon spawn, and unbound at death. But every X number of deaths, the camera just stops outright.

Currently the only way I can think of doing this is creating a buffer service that every RenderStep bind call will go through in order to be able to get back this information, but I’m unsure if theres already something I can’t read on the RunService wiki

Thanks for reading!

4 Likes

Couldn’t you go in game and press F9 and in there you will see all binds? ActionBindings.

Binds for the RunService?
I know the binds for the CAS are available in the console, but I’m after the RunService bind list. I can’t seem to find it anywhere, including the console.

1 Like

You mean :BindToRenderStep() ? If yes, couldn’t you create global variable _G.Binds and store all the binds inside it?

Its do-able, and something I’ve done in another project. However, I’m only curious to know if there is already a method to view this built in. If not, I might open a request for it to be added to the service.

I mean, I’ve never heard of it and there’s nothing on the wiki so it doesn’t really seem like there is one.

There does not appear to be any equivalent function for getting information about current bindings from RunService. The correct way to debug your problems here is probably to wrap calls to Bind and Unbind and track them, as you suggested.

Alternatively, you can test whether there is a binding by a particular name by wrapping an Unbind call in pcall: if it errors, there was no callback with that name bound. Obviously, this is not a preferable solution because you will end up unbinding a callback by that name if it does exist.

You may also have some luck using the microprofiler!

4 Likes

Yeah, thats what it’s looking like.

I’m still wrapping my head around the microprofiler, is there a method of searching for things within it?
To my knowledge all the information is found manually with it.

^ not 100% sure.

The best debugging approach here if you simply want to track developer-created bindings would still be to wrap the bind/unbind functions.

You can generate a microprofiler dump and take a closer look at the rendering labels, specifically the ones aligned with fireBindToRenderStepCallbacks. This should show you the work that is being done by any callbacks that have been bound, although it does not appear to identify these by the binding labels provided by the developer.

1 Like

I not really am understanding your problem, but why you dont simply use the BindToRenderStep and the UnbindFromRenderStep?

The issue isn’t using the service, the issue is find what is already bound.

So if I have something and I say;
RunService:BindToRenderStep(“Something”, Priority, Function)
Then to UnBindFromRenderStep, I have to already know that their is a bind called “Something”.
I can’t check this without UnBinding either, so I’d have to create an additional table storing all the binds I’m making.

The question of this post is simply;
Is there already a method I can call on the RunService - like CAS has.

RunService:GetAllBoundInfo()

To return something like

{
[BindString - String] = {PriorityValue - Enum.RenderPriority; Function - function}
}

But apparently not.

1 Like

It may be a great feature request, but it does not exist.
In the meantime, use a module to reproduce what you want.

To bind to render step, use module:BindToRenderStep(f)

  • In the module, keep reference of the bind.

To unbind all, you can use module:UnbindAllRenderActions()

  • In the module, unbind all references.