Description
The Rebuild
method is a public instance method of the ManualHitbox
class. It is used to reconstruct or update the hitbox configuration for the associated GameObject
. This method is particularly useful when changes are made to the hitbox properties, such as shape, size, or position, and you need to ensure that the hitbox accurately reflects these changes.
Usage
To use the Rebuild
method, you must have an instance of the ManualHitbox
component. Once you have this instance, you can call the method directly to update the hitbox configuration.
Example usage:
ManualHitbox hitbox = myGameObject.GetComponent<ManualHitbox>();
if (hitbox != null)
{
hitbox.Rebuild();
}
This will ensure that the hitbox is rebuilt based on the current properties set on the ManualHitbox
instance.
Example
ManualHitbox hitbox = myGameObject.GetComponent<ManualHitbox>();
if (hitbox != null)
{
hitbox.Rebuild();
}