Page MenuHomeFeedback Tracker

_WB_ workbench function overloading disallowed on classes inheriting GenericEntity
Closed, ResolvedPublic

Description

An error occurs when attempting to overload any of the workbench functions from GenericEntity, this does not happen when overloading the equivalent functions from GenericComponent.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce

Create a class inheriting GenericEntity and a method overloading any of the functions starting with _WB_.

The following class will cause the error

class ExampleEntity: GenericEntity
{
	override void _WB_AfterWorldUpdate(IEntity owner, float timeSlice)
	{
		// error - Overloading event '_WB_AfterWorldUpdate' is not allowed
	}
}

While this one will work as expected

class ExampleComponent: GenericComponent
{
	override void _WB_AfterWorldUpdate(IEntity owner, float timeSlice)
	{
		// no error - function overloads without problem
	}
}

Event Timeline

NarcoMarshmallow added a comment.EditedOct 21 2023, 1:14 AM

The issue is actually just that the GenericEntity version doesn't have the owner parameter, which I realised all of 15 seconds after making the report, the error should really reflect that the parameters are wrong and not that function overloading itself is disallowed however.

It can be closed straight away

Geez closed this task as Resolved.Oct 23 2023, 1:04 PM
Geez claimed this task.