1.1 KiB
1.1 KiB
AdvChkSys Python Bindings
These bindings allow you to use the AdvChkSys C# chunk system from Python via pythonnet.
Requirements
- .NET 6.0+ or .NET Core 3.1+ (to build AdvChkSys)
- Python 3.8+
pythonnet(pip install pythonnet)
Usage
-
Build the AdvChkSys C# library (DLL must be present in
src/AdvChkSys/bin/Debug/netstandard2.1/AdvChkSys.dll). -
Install pythonnet:
pip install pythonnet -
Use the bindings in Python:
from advchksys import get_version, create_2d_manager, create_constraints print("AdvChkSys version:", get_version()) constraints = create_constraints(min_x=0, max_x=10, min_y=0, max_y=10, max_loaded=100) manager = create_2d_manager(constraints) chunk = manager.LoadOrCreateChunk(1, 1, 16, 16) chunk[0, 0] = 42 print("Chunk value at (0,0):", chunk[0, 0])
Notes
- You can access all public methods and properties of the C# classes.
- For advanced usage, see the pythonnet documentation.