I want this to be called only when
something is true in GameInstance BP.
I also thought about playing the
animation too from GameInstance. Is it
good Idea? (There is already too much
complexity in GameInstance)
I’d say no. This belongs in the actor. Much simpler to handle the way you have it now because the GI does not (and probably should not) need to know about all the actors that need some kind of animation.
Besides that, you can’t even have a Timeline (or any other component) in the Game Instance - a little known fact, actually…
And Is it good Idea to put your most
of the game logic in Game Instance?
Not really. Game logic should be in the actors / managers - that’s the whole point of OOP. I mean, you absolutely could keep top level routines in the framework classes - like world generation, point tracking system, saving data, level loading, main menu, settings - that’s their purpose. But game logic itself, I’d say no.
Technically game logic bits could sit in the Game Mode if you had multiple levels and each level had some unique yet shared functionality. Again, depends on what you really mean by game logic.
Main game loop? Sure, GI may be a good place for this. But playing animations on touched actors, I’d say not really.
The official documentation only says
it is to share data between levels.
Because it’s persistent but who’s Epic to tell you what not to do, eh?