Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate pool size using VRCWorld #12

Open
Happyrobot33 opened this issue Oct 9, 2023 · 0 comments · May be fixed by #15
Open

Automate pool size using VRCWorld #12

Happyrobot33 opened this issue Oct 9, 2023 · 0 comments · May be fixed by #15

Comments

@Happyrobot33
Copy link

Its possible to automate the pool size assignment by pulling the world size directly from the VRC Api

A function like this can get the current scenes VRCWorld into a variable

private static async Task GetWorld()
        {
            //get the pipeline manager by finding the PipelineManager component in the current scene
            PipelineManager pipelineManager = GameObject.FindObjectOfType<PipelineManager>();
            var worldId = pipelineManager.blueprintId;

            //if its a new world (no id), skip
            if (worldId != null)
            {
                //get the world from the api
                world = await VRCApi.GetWorld(worldId, true);
            }
        }

And then you can query the max capacity by doing world.Capacity

@Happyrobot33 Happyrobot33 linked a pull request Oct 17, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant