[Unity toolkit] Question on instancing backing classes

I’m trying to create a interface in C# that will pass an array of strings to my GUI controller and I’m wondering how I’m able to do that with a basic TS class, every time I add a typescript class and the corresponding backing .cs class I get an error when I try and add that component to a game object.
I just want to put multiple components of this gui controller into the scene set their arrays of buttons / text then pass those to a manager that will generate them.

I understand that on the export class UIController extends BABYLON.MeshComponent {

The var myProperty = this.getProperty("SomeProperty", "default"); Will get me these backing properties but I want to be able to get many and use the same class to generate them. Do I need to have a component extend from the MeshComponent to be able to call it from C#?

Pinging @MackeyK24

1 Like

No you don’t. The MeshComponent is just a normal class with game event life cycle

I understand after taking some time to debug the code, I didn’t realize that the actual component acts as a object and just spits out the data of the object in json, so this is the actual mesh “gameObject”

You posted 2 seconds before I did @MackeyK24 thanks so much I understand now.

1 Like