Mesh.id = n is now shown as 'INVALID' in the Inspector (Though is still valid in code)

Dears,
Just found this morning something new (believed to be a bug) in the Inspector.
I have been assigning numbers/integers as id to my meshes (mesh.id = 1).
This morning found that the inspector shows the id as ‘INVALID’.
Though, the mesh id is still read fine through code. Not sure when this changed but I’m certain it wasn’t like that sometime ago because I checked on it when I built the logic.

1 Like

This is a change we made two months ago, because the inspector was crashing when invalid identifiers were defined for meshes.

Note that a numeric identifier is invalid (even if the inspector didn’t crash for this type of identifier): the property is declared as a string and must be defined as a string.

2 Likes

I see. Though, as per my PG (and my scene) you can still access it when it is just a number. It doesn’t show an error or even warning?! So, should I expect this to eventually break sometime later and change everything to a string?
And then, another finding of mine, is that you cannot split the id using ‘includes’ the same way you can do with ‘name’. If the id is to be a string, is there any reason for this limitation?
Thx,

Edit: Apologies. Just found the bug. If one of my mesh is not using a string as id the includes fails. Else it does work

So I guess, this also answers my above question (sry). The ID needs to be a string.

Update: OK, fixed it in my scene and looks all fine. Thanks (again) for your time and I shall keep this info: id is string :face_with_hand_over_mouth:

1 Like