SkillAgentSearch skills...

Natstep

Cross-platform step counting for Unity Engine.

Install / Use

/learn @videokit-ai/Natstep
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Pedometer API

Pedometer is a native pedometer API for the Unity game engine. The API provides sensor information about step count and distance covered (in meters). It is a minimalist API with native backends on iOS and Android.

Using the API

To use the API, simply create a Pedometer instance:

// Create a pedometer
// The OnStep callback will be invoked each time a step is detected
var pedometer = new Pedometer(OnStep);

void OnStep (int steps, double distance) {
    // Display the values
    stepText.text = steps.ToString();
    // Display distance in feet
    distanceText.text = (distance * 3.28084).ToString("F2") + " ft";
}

When you are done detecting steps from a Pedometer instance, you must dispose it:

// Dispose of this pedometer instance
pedometer.Dispose();

Notes

  • On iOS, you must add an NSMotionUsageDescription key to the Info.plist in Xcode before building. This determines the message used to request pedometer permissions from the user.

Credits

Related Skills

View on GitHub
GitHub Stars111
CategoryDevelopment
Updated1mo ago
Forks26

Languages

C#

Security Score

100/100

Audited on Feb 28, 2026

No findings