webnetweaver Posted August 20, 2025 Posted August 20, 2025 (edited) I just learned about the TrackerTool and I looked at the sample code showing how to load the animation in UnigineScript but I can't find any sample code showing how to do it in C#. What is the syntax for loading an animation created in TrackerTool in C#? Is this possible? If so, please provide sample code if possible. Thanks Edited August 20, 2025 by webnetweaver
silent Posted August 21, 2025 Posted August 21, 2025 You can check C# API Samples (in SDK Browser) or on github: https://github.com/unigine-engine/csharp-component-samples/tree/main/data/csharp_component_samples/animation/track_playback 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
webnetweaver Posted August 21, 2025 Author Posted August 21, 2025 (edited) Thank you for the quick reply Silent. It looks like much of the track file parsing is written in UnigineScript with most of the main logic already written. When I want to play a Tracker Tool animation, I would right click on the asset browser - Create Code - USC to add the code in tracker_wrapper.h to the project, add component Tracker.cs and set paths to the track files. Then I would add component TrackPlayback.cs to call Tracker.SetTime(filename, time) using code like in the sample. Thanks for the guidance. Edited August 26, 2025 by webnetweaver
webnetweaver Posted August 25, 2025 Author Posted August 25, 2025 Yea this doesnt work. When i try this setup: I get the error: WARNING: tracker_wrapper.usc not setup as world script. Setup it in Editor. There doesnt seem to be a dedicated C# API for loading tracker animations at runtime so I assume it's not fully supported for C# projects yet. The sample code in the C# API Samples for loading tracker animations seems to depend greatly on having UnigineScript set up in a specific way which isn't obvious if you're working mainly in C#. Let me know if I'm missing something here.
silent Posted August 25, 2025 Posted August 25, 2025 You need to set tracker_wrapper.usc (or tracker_wrapper.h) as world script: 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
webnetweaver Posted August 25, 2025 Author Posted August 25, 2025 (edited) 12 hours ago, silent said: You need to set tracker_wrapper.usc (or tracker_wrapper.h) as world script: Thanks that worked! I created a tracker animation for a box: And then was able use it as a moving platform that player can stand on: unigine tracker.mp4 Thanks very much for the help Silent. Edited August 25, 2025 by webnetweaver 1
Recommended Posts