CSharpObjectPool

An asset by BTOTHER
The page banner background of a mountain and forest
CSharpObjectPool hero image

Quick Information

0 ratings
CSharpObjectPool icon image
BTOTHER
CSharpObjectPool

An object pool for Godot .net

Supported Engine Version
4.0
Version String
0.0.1
License Version
MIT
Support Level
community
Modified Date
2 months ago
Git URL
Issue URL

GodotCSObjectPool

An object pool for Godot .net

Example :

To learn more, plz check source code comment.

    public override void _Ready()
    {
        _bulletPool = new NodePool<Bullet>(
            () => GD.Load<PackedScene>("res://Bullet.tscn").Instantiate<Bullet>(),
            bullet =>
            {
                bullet.Show();
                bullet.SetProcessMode(ProcessModeEnum.Inherit);
            },
            bullet =>
            {
                bullet.Hide();
                bullet.GlobalPosition = _bullets.GlobalPosition;
                bullet.SetProcessMode(ProcessModeEnum.Disabled);
            },
            bullet =>
            {
                bullet.QueueFree();
            },
            false,
            2000,
            3000
        );
        AddChild(_bulletPool);
        _bulletPool.Init(bullet =>
        {
            bullet.Pool = _bulletPool;
        });
    }

    public void GetObj()
    {
        _bulletPool.Get();    
    }

An object pool for Godot .net

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
CSharpObjectPool icon image
BTOTHER
CSharpObjectPool

An object pool for Godot .net

Supported Engine Version
4.0
Version String
0.0.1
License Version
MIT
Support Level
community
Modified Date
2 months ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers