转至内容
商品 Lightweight Spawning Tool 的媒体 1

描述

Lightweight Spawning Tool for Unreal

The Lightweight Spawning Tool exists to make life easier - no more headaches trying to get spawn orders to work! Objects don't spawn inside each other thanks to a lightweight spawning algorithm, allowing the user to handle the rest based on their needs. Using the Lightweight Spawning Tool, the user can easily set up external code to spawn what they want in zones provided, allowing their attention to go to other systems the project may need.

Installation

.h and .cpp files go into the source file of the user’s Unreal project. Likewise .uassets go into the content folder.

As long as the user has generated a .vs project with the Unreal project file (May be hidden on Windows 11) and has the assets in the right place, Unreal should be able to correctly import the files into the project for use.

Quick Use Guide

To get any version of this tool working, simply place an amount of Spawn Zones into your desired level - remember to select a shape for your area -, drop a Spawn Manager into your level, then use the claim zones function to attach the areas to the manager. Then simply create a class inheriting from the Spawnable actor and have an array of them somewhere. After this, whenever you wish to spawn them, simply call the manager's Spawn Objects function with the array of the Spawnables and the number you wish to spawn.

If you are having trouble locating the plugin, you may need to click the Settings Cog on the Content Browser. Select Show Engine Content. Navigate to the left pane and follow this path (alternatively copy the path and paste it into the Content Browser Search Bar): EngineData/Plugins/Classes_LightweightSpawningTool/LightweightSpawningTool/Public

Tool Documentation

ASpawnActor

This actor class serves as the base Spawnable class for user classes to inherit in order to use it for this tool. The reason being is that the user's classes can then make use of the On Spawn and On Despawn virtual functions. For example, if a character should be assigned to a team, that logic can be put on the On Spawn. This actor also holds a reference to the manager that spawned it in, which helps keep your house tidy.

FSpawnZone

This struct serves as the base struct for the Spawning Zones. Currently the types of zones are Sphere, Box and Cylinder.

ESpawnZoneType

Sphere, Box and Cylinder

ASpawnZoneActor

This actor allows the user to simply drag and drop into the editor where they want Spawn Zones and assigning the type via the enum before a manager claims them.

ASpawnManager

This actor manages an array of Spawn Zones by either adding to the arrays manually or using the Claim Actors editor function in order to claim all the spawn actors in the level. The spawning can be set to either Fill or Spread modes and can call Spawn Objects function, passing in an array of spawn objects to spawn from. Note that the objects get taken out of the array, so if you wish to return to that pool, you can do so in the On Despawn function. This function also takes in a number to spawn which gets updated so the value passed in will be 0 if all objects managed to spawn. Another value passed in is the assumed size of the object for the under the hood algorithms to use.

Future Plans

Easily addressable spawn timer Multi-threading optimisations Ease of Access.

Different draw colours to improve visibility

Reporting Issues

The tool has been tested with UE5.1.1 and up, using Windows 10 Home x64 Build 19045 - Windows 11 Pro x64 Build 22631 - Linux Ubuntu (Studio) 24.04 LTS x64 Kernel 5.4.0

The tool is incredibly efficient and lightweight. The Lightweight Spawning Tool is very unlikely to have any compatibility issues but if you find something, we’d be more than happy to help. We’re open to any suggestions too. Feel free to ask a question on the Epic Games Marketplace (Do let us know which version and OS you're using).

Change Log 1.1

- Refactored and modularised codebase (It runs smoother, quicker, and it's more versatile!)

- Support for Linux development and building for all you maniacs out there

--- Mac support is in progress, thought it's slow with no hardware given the relationship between Epic and Apple :/

Credits

Martin Jones - Programmer & Developer

John Montgomery - Producer

包含格式