Hi guys, very strange behavior in code, on start game variable of class established by default.
Video for clarity - Variable bug - YouTube
Can you help me, please?
p.s. if use it in BeginPlay() all ok.
Hi guys, very strange behavior in code, on start game variable of class established by default.
Video for clarity - Variable bug - YouTube
Can you help me, please?
p.s. if use it in BeginPlay() all ok.
Try setting speed on BeginPlay, this way you are sure everything is properly initiated
I fixed it by setting an empty macro for these variables, example:
private:
UPROPERTY()
float Speed = 100.0f;
Can anybody explain why this works, please? (I mean why empty macro allows to work in OnConstruction())