PhysX 3.3.3 - How to Show Custom Data in the Visual Debugger Inspector?

Hi folks - I was wondering if anyone has managed to get their own data to show in the visual debugger inspector windows. I’ve read the sparse docs on this and they essentially say - the PxJoint is written as an extension and implements this, just look at that…and…I have but I seem to be missing something as it’s not coming through but none of the PhysX calls are returning errors…

What I’m trying to achieve is to have one of my own custom simulated objects stream its data to the debugger so I can see it alongside the rest of the frame just like the standard PhysX rigid bodies and geometries do. My test code below however is just trying to create something like the “PxPhysics.Version” property you can see if you go to the “All Objects” window (which is where I’m assuming this information will end up based on the PhysX source code). Nothing appears for me…and no errors are returned…

I’ll run you through what I have.
I’ve implemented a custom ConnectionHandler which creates the definition of my custom simulated object, below.

using namespace physx;

SimpleConnectionHandler::SimpleConnectionHandler(SimplePhysicsObjectTest* myObject, SimplePhysXManager* manager)
{
    m_myObject = myObject;
    m_dataStream = nullptr;
    m_manager = manager;
}

void SimpleConnectionHandler::onPvdSendClassDescriptions( physx::debugger::comm::PvdConnection& connection )
{
    m_dataStream = &connection.createDataStream();

    
    m_dataStream->addRef();

    physx::debugger::PvdError errorReturned = m_dataStream->createClass< SimplePhysicsObjectTest >();
	
    debugger::comm::PvdPropertyDefinitionHelper& theHelper( m_dataStream->getPropertyDefinitionHelper() );
    theHelper.pushName( "MyTestSecond" );

    m_dataStream->createProperty<SimplePhysicsObjectTest, PxReal>( "MyTestSecond.Speed_test" );
    m_dataStream->createProperty<SimplePhysicsObjectTest, PxReal>( "MyTestSecond.Acceleration_test" );
    m_dataStream->createProperty<SimplePhysicsObjectTest, PxReal>( "MyTestSecond.Rotation_Rate_test" );
    m_dataStream->createProperty<SimplePhysicsObjectTest, PxReal>( "MyTestSecond.Random_test" );

    theHelper.pushName( "Speed_test" ); theHelper.addPropertyMessageArg<PxReal>( offsetof( SimplePhysicsObjectTest, m_speed ) );theHelper.popName();
    theHelper.pushName( "Acceleration_test" ); theHelper.addPropertyMessageArg<PxReal>( offsetof( SimplePhysicsObjectTest, m_acceleration ) );theHelper.popName();
    theHelper.pushName( "Rotation_Rate_test" ); theHelper.addPropertyMessageArg<PxReal>( offsetof( SimplePhysicsObjectTest, m_rotationRate ) );theHelper.popName();
    theHelper.pushName( "Random_test" ); theHelper.addPropertyMessageArg<PxReal>( offsetof( SimplePhysicsObjectTest, m_bhp ) );theHelper.popName();

    theHelper.addPropertyMessage<SimplePhysicsObjectTest, SimplePhysicsObjectTest>();

    m_dataStream->flush();
}

void SimpleConnectionHandler::onPvdConnected( physx::debugger::comm::PvdConnection& connection )
{
    if( m_manager )
    {
        m_manager->m_physics->getVisualDebugger()->setVisualDebuggerFlag(PxVisualDebuggerFlag::eTRANSMIT_CONTACTS, true);
        m_manager->m_physics->getVisualDebugger()->setVisualDebuggerFlag(PxVisualDebuggerFlag::eTRANSMIT_SCENEQUERIES, true);
        m_manager->m_physics->getVisualDebugger()->setVisualDebuggerFlag(PxVisualDebuggerFlag::eTRANSMIT_CONSTRAINTS, true);
    }
}

void SimpleConnectionHandler::onPvdDisconnected( physx::debugger::comm::PvdConnection& connection ) { }

Then during the first frame I request an instance be created and pass a reference to my source data I want it to use.

physx::debugger::PvdError errorReturned = m_simpleConnectionHandler.m_dataStream->createInstance< SimplePhysicsObjectTest >( &m_myCar );

errorReturned = m_simpleConnectionHandler.m_dataStream->createInstance< SimplePhysicsObjectTest >( &m_myCar2 );
errorReturned = m_simpleConnectionHandler.m_dataStream->createInstance< SimplePhysicsObjectTest >( &m_myCar3 );

m_simpleConnectionHandler.m_dataStream->flush();

If I run this, with the debugger connected, I don’t see any of my custom data…

Can anyone see what I’ve done wrong by any chance?? :s

Does anyone know of any tutorials or more substantial documentation on this or can see what I’ve done wrong :s

Thanks very much in advance for any help/advice :)