Announcement

Collapse
No announcement yet.

Streaming Level and Spawned Actors

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

    Streaming Level and Spawned Actors

    Hi

    Just wanted to ask how others go about deleting spawned actors in a streamed level when unloading that level.

    At the moment, when I spawn an actor inside a streamed level and then unload that level, the spawned actors remain. I'm just not sure on a good way of going about deleting any spawned actors in a streamed level when unloading that level.

    Any help would be appreciated.

    #2
    Originally posted by Jimminy_Cricket View Post
    Hi

    Just wanted to ask how others go about deleting spawned actors in a streamed level when unloading that level.

    At the moment, when I spawn an actor inside a streamed level and then unload that level, the spawned actors remain. I'm just not sure on a good way of going about deleting any spawned actors in a streamed level when unloading that level.

    Any help would be appreciated.
    Hey, had exactly the same problem. Two things to know:

    1) When you spawn an actor, it actually appears in the persistent level, that's why it's still there after level unload.

    2) When you spawn an actor, you have to set the 'owner' pin to something in your level. That way, when the system unloads your level, it knows to kill the actors because they belong to someting in that level
    Check out Zof ( puzzle game ) on Steam:

    https://store.steampowered.com/app/1414480/Zof/

    Comment


      #3
      So I tried what you mentioned in regards to the owner pin, but for whatever reason it didn't work for me. However, I was able to find another work around which is working well. Since my streaming levels are basically an interior to a house/building, I was able to just use a box collision (covering the whole level - house/building) and check any actors overlapping with that and then destroying them just before unloading the level.

      Thanks for you help.

      Comment


        #4
        Originally posted by Jimminy_Cricket View Post
        So I tried what you mentioned in regards to the owner pin, but for whatever reason it didn't work for me. However, I was able to find another work around which is working well. Since my streaming levels are basically an interior to a house/building, I was able to just use a box collision (covering the whole level - house/building) and check any actors overlapping with that and then destroying them just before unloading the level.

        Thanks for you help.
        Are you sure you're setting the owner to something that's in the map, and not something in your streaming code?
        Check out Zof ( puzzle game ) on Steam:

        https://store.steampowered.com/app/1414480/Zof/

        Comment


          #5
          Yeah I tried several actors that are only in the map and still didn't work. The way I have it now is probably easier in my case since there are many ways an item can be spawned and I didn't want to go changing code all over the place. The actors I want to destroy all come from a single master item so it made the way i'm doing it now even easier.

          I'm very new to streaming levels, so still learning as I go.

          Comment

          Working...
          X