Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
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
5 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
Quick Information
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
5 months ago
Git URL
Issue URL