I would like a method within game objects to be called even when it is disabled (in Unity).
For now I’ve managed to use the constructor() method but the object isn’t hydrated yet (with data from Unity). With a simple setTimeout(..., 0) it does the job, but I wondered if there was a better alternative, such as a ready() method to override in the same way as start() or awake().
For my understanding: what are you planning to do with it?
You can add ISerializable to your component and implement e.g. onAfterDeserialize (this is called when a component is loaded from the gltf/glb and finished populating)
Hmm interesting. For my specific case it’s a simple script that stores in a TS class the instances of all objects that have that script (with an id set in Unity editor) to get them anywhere in code.
I’ve never liked the GameObject’s find methods because they all use the name or the structure.