Right now for Tweaker to work it requires keeping Hide overlay on hidden game UI option enabled because Render() callback is the only callback that can run ahead of the game speed (and therefore overwrite values before the game can revert them back). Since I don't have time to properly change Tweaker behavior (so it doesn't use Render() callback) it would be nice if something like Routine() method could be added. It will run just like Render() ahead of game speed but won't be affected by Hide overlay on hidden game UI option. CoroutineFunc() or Update() doesn't work.
Here's the quick example with render distance only working in Render() method (go to plugin Settings to change the update method).
Right now for Tweaker to work it requires keeping Hide overlay on hidden game UI option enabled because
Render()
callback is the only callback that can run ahead of the game speed (and therefore overwrite values before the game can revert them back). Since I don't have time to properly change Tweaker behavior (so it doesn't useRender()
callback) it would be nice if something likeRoutine()
method could be added. It will run just likeRender()
ahead of game speed but won't be affected by Hide overlay on hidden game UI option.CoroutineFunc()
orUpdate()
doesn't work.Here's the quick example with render distance only working in
Render()
method (go to plugin Settings to change the update method).Plugin_UpdateMethods.as
```asc #name "Update Methods" [Setting name="Update Method"] UpdateMethod Setting_UpdateMethod = UpdateMethod::None; CTrackMania@ app; CHmsViewport@ view; void Update(float dt) { if (Setting_UpdateMethod == UpdateMethod::Update) RenderDistance(); } void Routine() { while(true) { if (Setting_UpdateMethod == UpdateMethod::RoutineYield) { RenderDistance(); yield(); } else if (Setting_UpdateMethod == UpdateMethod::RoutineSleep) { RenderDistance(); sleep(1); } else { yield(); } } } void Render() { if (Setting_UpdateMethod == UpdateMethod::Render) RenderDistance(); } void RenderDistance() { if (app.GameScene !is null && (app.CurrentPlayground !is null || app.Editor !is null) && view.Cameras.Length > 0) { view.Cameras[0].FarZ = 100; print(Time::get_Now()); } } void Main() { @app = casthttps://user-images.githubusercontent.com/26721650/195425118-4cf8d938-896e-4277-82ca-773f94b384db.mp4