1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Spawning/Accessing actors from inside a UWindow.

Discussion in 'Programming' started by RestInPieces, Jan 27, 2002.

  1. RestInPieces

    RestInPieces New Member

    Joined:
    Sep 20, 2001
    Messages:
    65
    Likes Received:
    0
    This is what i found in UmennuPlayerMeshClient.uc, (i think this is the Unreal menu where you choose your charakter)

    MeshActor = GetEntryLevel().Spawn(class'MeshActor', GetEntryLevel());

    GetEntryLevel().Spawn...??? Does that mean i cannot access a level's object from Window code?
    So, for the trade interface I am currently working on (which is of course a Window), i will always have to put
    GetLevel().
    infront of most of my code?
     
  2. eXoR

    eXoR Lead coder

    Joined:
    Oct 22, 2001
    Messages:
    36
    Likes Received:
    0
    The UWindows are not childs of Actor, so they lack acces to functions like spawn. If you want to spawn something, you will need a reference to a child of Actor like the one that GetEntryLevel returns.

    So if you want to call a function that is in actor, you will have to put GetEntryLevel(). in front of the call.
     
  3. RestInPieces

    RestInPieces New Member

    Joined:
    Sep 20, 2001
    Messages:
    65
    Likes Received:
    0
    Ah, I see... (BeatingHeadAgainstWall)... not to difficult (DoingItAgain).
    thanks :)
     

Share This Page