Results 1 to 3 of 3
  1. #1
    MSgt. Shooter Person
    Join Date
    Apr 2012
    Posts
    96

    Default Built-in function that always runs at startup?

    Is there a built-in function, in US, that always runs no matter what?

    For example, in Unity, I could use the functions Start, or Awake and have stuff execute right away. Is there a universal function (i.e., one that can run in any extended class, and not just in Actor, etc...) that will run on start?

    I think PostBeginPlay() is only Actor extended classes, right?

  2. #2
    Palace Guard
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    3,939

    Default

    Objects are not really used without any Actor context in the engine, so the Actor can kick off any necessary events in the Objects itself when it's time for that.

    In my HUD system do I have a MenuScene object that is created in the HUD's PostBeginPlay() and immediately gets it's InitializeMenuScene() called by the HUD after it got created. In InitializeMenuScene() does it then go on and calls the initializing functions for all it's owned GUIComponents. Same chain of events when the HUD gets it's Destroyed() event called and propagates that to the MenuScene to let it clean itself up.
    Last edited by Crusha K. Rool; 06-24-2012 at 04:20 PM.
    Our Loop, which art in source code, hallowed be thy keyword.
    Thy condition come, thy instruction be done, in RAM as it is in cache.
    Increment us this day our daily counter,
    and forgive us our typos, as we also have forgiven our compilers.
    And lead us not to the nullpointer but deliver us from bugs.
    For thine is the API, the GUI, and the CLI while(true).
    Semicolon;
    Please don't send me questions about how to do something in the UDK via PM. That is better discussed in the forums and we only have limited PM storage.

  3. #3
    Veteran
    Join Date
    Sep 2006
    Location
    Newcastle, UK
    Posts
    6,937
    Gamer IDs

    Gamertag: ambershee

    Default

    PostBeginPlay is indeed what you're looking for. Objects tend to be owner by Actors.
    - Please do not send me questions regarding programming or implementing things in UDK via Private Message. I do not have time to respond and they are much better answered in the forums. -


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.