Default values

I’m not good as English …

I have a actor and create some components, I want set properties for collision. For example, setCollisionEnable(ECollision::NoCollision) or QueryOnly in my constructor.
(UPROPERTY on the component is set to be VisibleAnywhere)

On the other side, I could set the properties by using editor.

My question is whether default value will be used ?

If I set the default values in my constructor and drop my BP object on my map, the default values of the object is the same as I set in my constructor. When I change the value on the editor, I don’t know the mechanism how to work… The default value seems to be overwritten by the editor. I wanna the constructor has the highest priority…

I think you’ll find the constructon script take precedence over anything you can enter in the editor ( I can’t change a value I’ve set in the script ).

I didn’t use the construction script. I just change the default value in my BP-editor and I set some value (some default value of components, ex, properties of collision responds…) in the C++ constructor. I found the BP-value will overwrite the value I set in the C++ constructor. Is it normal?

I don’t really know I’m afraid, but maybe this is helpful: