About lifecycle - Babylon Unity Toolkit

Can anybody give me information how is BABYLON.MeshComponent implemented?

@MackeyK24

module PROJECT {
export class NewMeshComponent extends BABYLON.MeshComponent {
public constructor(owner: BABYLON.AbstractMesh, scene: BABYLON.Scene, tick: boolean = true, propertyBag: any = {}) {
super(owner, scene, tick, propertyBag);
}

        protected start() :void {
            // Start component function
        }

        protected update() :void {
            // Update render loop function
        }

        protected after() :void {
            // After render loop function
        }

        protected destroy() :void {
            // Destroy component function
        }
    }
}

That is really old toolkit if you still have BABYLON.MeshComponent.

You can download the latest toolkit here: UnityExporter/Redist/2023/BabylonToolkit 2023 BX-6.31.0.unitypackage at master · BabylonJS/UnityExporter · GitHub

This is the new life cycle. The class is encoded in the Unity Exported GLTF from the toolkit. But you can attach it to TransformNode at runtime if you like

module PROJECT {
    /**
    * Babylon Script Component
    * @class MyTestComponent
    */
    export class MyTestComponent extends BABYLON.ScriptComponent {
        // Example: private helloWorld:string = "Hello World";

        protected awake(): void {
            /* Init component function */
        }

        protected start(): void {
            /* Start component function */
        }

        protected ready(): void {
            /* Execute when ready function */
        }

        protected update(): void {
            /* Update render loop function */
        }

        protected late(): void {
            /* Late update render loop function */
        }

        protected after(): void {
            /* After update render loop function */
        }

        protected fixed(): void {
            /* Remove empty function for performance */
        }

        protected reset(): void {
            /* Reset component function */
        }

        protected destroy(): void {
            /* Destroy component function */
        }
    }
}

where can I see implementation of BABYLON.MeshComponent and BABYLON.ScriptComponent?
@MackeyK24