I think that checking every frame if the respawningCoin has moved is not the best way. This doesn’t seem to be optimised.
Can’t we store instead a vector2 property in the RespawningCoin Class with getter and setter. or is there something i’m missing ?
When the value is Set, then we’ll do “Show(true)”.
What do you think ?
Edit : I tried to do it that way, but that doesn’t seems to work because the code is triggered on the server side, I understand why you did it that way.
Still looking for another option…
well, it is not possible to inherit from the Transform class in Unity and directly modify the value of the position property. The Transform class is a sealed class in Unity, which means it cannot be inherited. so I don’t know if this is possible to do it another way.
My conclusion is that we might use a boolean and synch it accross the clients… But it comes with a traffic cost (more data to be send). Your way makes more calls on the clients but the network is less disturbed.
Please let me know what you think about my conclusion and why you choose this implementation.