I have a newly instantiated gameObject with DialogueActor on it with proper actor name (which used to work fine in general cases).
However,
Code: Select all
GetSubject(0)
It ignores the one that is newly instantiated even if it has DialogueActor that sets to exact Actor string name.
Any reason why?
It seems like a scene info(list of object or list of DialogueActors) did not get updated?
Edit: I tried print info level logs and it seems like the instantiated DialogueActor did not call RegisteringTransform of its own on OnEnbale at all. I don't know why
Edit2: Ok I figured it out. I was destroying the object that is registered under registeredActorTransforms with name os "AAA". But at the same time I was instantiating a new object with same Actor name "AAA".
Since I was not calling DestroyImmediate() but just Destroy(). Even thought I called Destroy() before Instantiating, it destroys the gameObject a bit later so my newly registered gameObject was Unregistered.