how to using Igame?

 
 
 
Posted by:SITT
Data created:4 May 2010

IIGameScene gameScene = MaxGlobal.IGameInterface;
int NodeCount = gameScene.TopLevelNodeCount;
MessageBox.Show(NodeCount.ToString());
for (int i = 0 ;i < NodeCount;i++)
{
IIGameNode tNode =  gameScene.GetTopLevelNode(i);
MessageBox.Show(tNode.Name);
}

 

why,i only get count == 0 ?

the scene have some teapot

I am not really sure why you get no nodes here, here's what the docs say:

All node access is provides by parent nodes. This does not include the Root node as in 3ds Max. This method can be used to traverse the scene

Returns:
The number of parent nodes

Marsel Khadiyev (Software Developer, EPHERE Inc.)

very thanks

I question because no initialization the igame

 gameScene.InitialiseIGame(false);