Announcement

Collapse
No announcement yet.

Re-run construction script on asset modification?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Re-run construction script on asset modification?

    I have an Actor with an ability to set a reference to an Data Asset.

    The Actor has OnConstruction() overridden so that when the Data Asset reference is set it can add/configure components based on the information stored in the Data Asset.

    However, if the Data Asset is modified the Actor will not re-run OnConstruction() which may result in incorrect behavior.

    Is there a way to re-run Actors' construction scripts when an asset they reference is modified?

    Thanks,

    ~Robert
    Realistic Atmosphere 2.0 | YouTube | Forum | Marketplace

    #2
    If asset is custom class you can add a dynamic delegate in it and subscribe actors class to it from Actor's PostEditProperty..

    Then from asset class in its own PostEditProperty call the event...
    Probably should make them all EditorOnly as well, since having these functions packaged would just waste resources.
    | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

    Comment

    Working...
    X