Update…If I have a clone of object, that is visible at begging, then code above works (for another object).
gameobject1 has the same mesh as gameobject2
gameobject2 has NotifySpaceManager attached
gameobject2 is not enabled at scene start
OK SCENARIO:
//////////////////////////////////////////////////////////
gameobject1 —enabled < detected
gameobject2 —disabled < not detected
then enable gameobject2, which has NotifySpaceManager behaviour
gameobject1 —enabled < detected
gameobject2 —enabled < detected by spacemanager
ERROR SCENARIO:
//////////////////////////////////////////////////////////
gameobject2 —disabled < not detected
then enable gameobject2, which has NotifySpaceManager behaviour
gameobject2 —enabled < not detected by spacemanager (ERROR!!!)
It seems, that UpdateGraphForObstacle doesn’t work, if there is not a GameObject with the same mesh available at the start of scene.
I guess method should have functionality to automatically add mesh, if it is not present.