-
Notifications
You must be signed in to change notification settings - Fork 464
Description
Small but helpful QoL request
Is your feature request related to a problem? Please describe.
NetworkVariableBase is available for developers to create their own implementations, however if additional logic is needed for initializing the custom network variable, a new entry point must be added and manually called whenever used.
Describe the solution you'd like
Add virtual keyword to NetworkVariableBase.Initialize()
Describe alternatives you've considered
Could instead provide a virtual OnInitialize() that gets called from Initialize() if concerned about base.Initialize() not being called. NetworkBehaviour param should be either passed through or a protected getter for m_NetworkBehaviour should be provided in this case.
Additional context
Use case being applied to: Custom NetworkVariableBase that wraps a NetworkVariable to provide automatic full reference resolution on clients when the target reference is spawned. Additional initialization logic is required in addition to calling Initialize() on the internal NetworkVariable.