I have an problem with LoadTVS, I tested it with vb6 and C#:
Create a Package and save the scene:
Dim cubo As TVMesh
Set cubo = Scene.CreateMeshBuilder("Prueba")
cubo.CreateBox 10#, 10#, 10#
cubo.SetPosition 5#, 5#, 10#
Dim pckg As New TVPackage
pckg.CreatePackage "pruebas.pck"
Load the saved scene:
Dim idPackage As Long
Dim pckg As New TVPackage
idPackage = pckg.OpenPackage("pruebas.pck")
Scene.LoadTVS idPackage
Dim cubo As TVMesh
Set cubo = GetMesh("Prueba")
MsgBox GetMeshFromID(0).GetMeshName()
MsgBox cubo.GetMeshName()
in C#:
TVPackage pckg= new TVPackage();
int idPackage = pckg.OpenPackage("pruebas.pck");
Scene.LoadTVS(idPackage);
TVMesh cubo = Globals.GetMesh("Prueba");
MessageBox.Show(Globals.GetMeshFromID(0).GetMeshName());
MessageBox.Show(cubo.GetMeshName());
In both languages the first message box displays the mesh name (Pruebas) but the second throws an error:
VB6: Object variable or With block variable not set.
C#: Object reference not set to an instance of an object.
It looks like something is not updated when LoadTVS is called.