0

I want use this package: https://github.com/sandrofigo/VoxReader I am a beginner in C#, and I looked some tutorial and I couldn't make it work with my code, there are always some errors.

main.cs:

using System;

class Program {
  public static void Main (string[] args) {
    Test myTest = new Test();
    myTest.Run();
  }
}

Test.cs:

using System;
using VoxReader;

class Test
{
  public void Run()
  {
    // Read .vox file
    IVoxFile voxFile = VoxReader.Read("my_awesome_model.vox");

    // Access models of .vox file
    IModel[] models = voxFile.Models;

    // Access voxels of first model in the file
    Voxel[] voxels = models[0].Voxels;

    // Access properties of a voxel
    Vector3 position = voxels[0].Position;
    Color color = voxels[0].Color;

    // Access palette of .vox file
    IPalette palette = voxFile.Palette;

    // Access raw data of a chunk
    byte[] rawData = voxFile.Chunks[0].Content;
  }
}

packages.lock.json:

{
  "version": 1,
  "dependencies": {
    "net6.0": {
      "VoxReader": {
        "type": "Direct",
        "requested": "[4.0.0, )",
        "resolved": "4.0.0",
        "contentHash": "P1LlbtuHEG5kbkxsOHZdark40TCp5CkurqyN3BxZ4xUiodKTQzjjlapRBQL4FWotw6DP1UFue1FsC7TiabVNVg=="
      }
    }
  }
}

Errors:

errors in console

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

Unfortunately, there is no beginner-friendly way of adding NuGet packages to repl.it.

Giorgi Anakidze
  • 206
  • 1
  • 9