Add notes into breakout boxes in sensor create tutorial.

This commit is contained in:
Balázs Kis 2023-01-24 17:03:32 +01:00 committed by bernat
parent c075f007d7
commit f14acb257e
1 changed files with 12 additions and 3 deletions

View File

@ -62,7 +62,10 @@ pipeline
Object representing the data generated by the sensor. This is the object Object representing the data generated by the sensor. This is the object
that will be passed to the final user, both in C++ and Python APIs. that will be passed to the final user, both in C++ and Python APIs.
> **Note**: To ensure best performance, sensors are registered and dispatched using a sort of "compile-time plugin system" based on template meta-programming. Most likely, the code won't compile until all the pieces are present. !!! note
To ensure best performance, sensors are registered and dispatched using a
sort of "compile-time plugin system" based on template meta-programming.
Most likely, the code won't compile until all the pieces are present.
--- ---
## Creating a new sensor ## Creating a new sensor
@ -246,7 +249,9 @@ void ASafeDistanceSensor::Set(const FActorDescription &Description)
} }
``` ```
> **Note**: The set function is called before UE4's `BeginPlay`, we won't use this virtual function here, but it's important for other sensors. !!! note
The set function is called before UE4's `BeginPlay`, we won't use this
virtual function here, but it's important for other sensors.
Now we're going to extend the box volume based on the bounding box of the actor Now we're going to extend the box volume based on the bounding box of the actor
that we're attached to. For that, the most convenient method is to use the that we're attached to. For that, the most convenient method is to use the
@ -285,7 +290,11 @@ void ASafeDistanceSensor::Tick(float DeltaSeconds)
} }
``` ```
> **Note**: In production-ready sensors, the `Tick` function should be very optimized, specially if the sensor sends big chunks of data. This function is called every update in the game thread thus significantly affects the performance of the simulator. !!! note
In production-ready sensors, the `Tick` function should be very optimized,
specially if the sensor sends big chunks of data. This function is called
every update in the game thread thus significantly affects the performance
of the simulator.
Ok, a couple of things going on here that we haven't mentioned yet, what's this Ok, a couple of things going on here that we haven't mentioned yet, what's this
stream? stream?