Adding ISM Component using Call In Editor Function

Hello,

I have created a Blueprint Function Library in which I added a new function that creates and adds Components to an Actor at run-time or in Call in Editor Events.

I created this function for editor only use, so that it can automatically add components but the problem is the added components get removed once i reload the level or restart editor.

Before Reloading Level (Not In Play Mode)
image

After Reloading Level
image
back to square one.

Try calling Actor->AddInstanceComponent with the components you create.