I did plan to make my Actor objects NetDormancy property as DORM_Initial; So I wrote below code in it
s constructor;
NetDormancy = DORM_Initial;
But it was not working as I expected.
So I did try other versions like
NetDormancy = Super::SetNetDormancy(DORM_Initial);
or
NetDormancy = ENetDormancy::DORM_Initial;
But every struggle was useless.
I`m using Unreal Version 5.4.
Is there any solution to solve this?
3dRaven
(3dRaven)
July 16, 2024, 8:44am
2
You need to override PostInitProperties()
in header
virtual void PostInitProperties() override;
in cpp
void AYourActorClass::PostInitProperties()
{
Super::PostInitProperties();
NetDormancy = ENetDormancy::DORM_Initial;
}
OFC replace AYourActorClass with your actor class.
Thank you for your suggestion.
But it is not still working.
My first try to set NetDormancy`s value was constructor.
And now setting its value in PostInitProperties() was failed.
I can`t understand what is wrong with NetDormancy.
Anyway thank you for answer.
3dRaven
(3dRaven)
July 16, 2024, 11:23am
4
It works.
You probably just have an overriden vakue in your bp file. Enter it and check if you have a curled arrow icon next to net dormancy. If so click it and it will go to the value in postinit properties.
To prove it, create a new class based on the c++ variant and it will set correctly.
If its not set then you are changing it elsewhere.
You are my savior!
I didn`t change instance of blueprint on current level.
When I changed it with new instance. It`s working fine.
I did spend a lot time to solve it.
But with your detailed solution, it was finally solved. Thank you very much!
3dRaven
(3dRaven)
July 16, 2024, 3:22pm
6
Glad you were able to get it working in your project.
system
(system)
Closed
August 15, 2024, 3:23pm
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.