Object Chunks

$14
Publisher EmptySkull
File size 26.09MB
Number of files 28
Latest version 1.0.1
Latest release date 2022-04-01 08:23:33
First release date 2021-04-13 10:49:15
Supported Unity versions 2018.4.2 or higher

A scene in Unity is a virtual space for your GameObjects. To optimize the calculations and behaviors on the scene-objects, the scene can be divided into chunks. This is, what the Object Chunks plugin is designed for. A chunk is a rectangular part of your virtual scene space and defined by a two-component integer vector (called Vector2Int in Unity), describing its X and Y position in your chunk grid. Once, the plugin is in use and chunks are calculated, the total space or number of chunks is nearly infinite since chunks are no physical or virtual objects of your data-memory, but abstract concepts to compare or differ object’s positions in your scene. Chunks are always two-dimensional but can easily be used in a three-dimensional context by extending their “height” since relevant distances (e.g., in “Open World” concepts) are most often of planar nature. The size of chunks as well as offsets for the chunk grid origin and further settings can be set by you, the user.


Chunks are used to calculate, simplify, and compare objects positions. Every Unity-GameObject of your scene, identified as a “Chunk Object” can calculate the chunk it is part of easily and fast. This can be used to drastically simplify calculating positional relations between Chunk Objects.


Furthermore, the plugin provides a method called Chunk-Loading, where a list of chunks marked as "active" is maintained. Objects, entering or leaving an active chunk, are processed by the system and receive callbacks for per-object behaviors. This makes it easy to get a list of all chunk objects in an optimized way. Loading chunks (e.g., by distance to a specified object, for example the player-avatar) is easy to setup and manage. In addition, the plugin supports multiple chunk-loading sources (e.g., different player-avatars).

Top Publisher Assets