Hey, what is an “Outer” regarding object instantiation?

You can think of it as an owner/parent of sorts.

When you look at a map the Outermost is the Package. Inside the Package is a World and the World’s outer is the package. Then you have a Level whose outer is the World. And then you have a list of Actors each with the Level as an outer. Components generally have the Actor as their outer.

From a persistence point of view, as you track up the outer chain of a given object that will tell you what package it is in. It is also useful for garbage collection in that any outer of a referenced object must stay in memory too.

1 Like

Ok thanks, so by default, outer is a level, but when I attach an Actor to another one it’s that one?

What is the difference between Level and World? Can I think of it like World is the map and Level is the setting/game mode?

All Actors always have an outer of a level, that is a assumption throughout many systems. The Actor (and Component for that matter) attachment system is independent of ownership hierarchy.

There isn’t a particularly good answer to that. In some ways the split is a vestigial remnant of the engine’s history. The World is, for the most part, the object you will interact with. It is very rare to actually read data or manipulate the Level directly other than the fact that the Level contains the Actor list. I might track down an old email I wrote about the relationship between Worlds, Levels, and Actors for someone internally and polish it out in to a Blog post, but generally, I’d suggest you don’t need to worry too much about the mechanics there.

1 Like