Pausing Object With Time.Timescale excepting line renderer

Sory for if this question mentioned before nearly I’ve looked all over the forum.Saw a couple solitions for dynamic game objects with time.unscaledDeltaTime or using abstracts class to imitade update function for exclude line renderer from time.timescale.

Want to pause every other game objects (or low speed) when i start drawing line with line renderer.But when i use time.timescale=0; everything stops.Also looked time.timeunscaledtime but i cant use that option with line renderer this code for just for moveable objects but it is also effect(stops) my line renderin script.

Is there any solutions for this issue?

Thank you!

To do that Unity would have to provide a way to manually update the LineRenderer yourself in Update(), and sadly they do not provide that. It depends on Time.deltaTime so invariably setting TimeScale=0 is going to stop the Line Renderer.

The only way I can think to get around this is to find some other way to pause your game that doesn’t involve setting TimeScale to 0, such as having a Time Manager that provides multiple versions of deltaTime to every script in your game, and lets you modify those values for other groups of scripts as you define.

For example the script could read the value of deltaTime every frame, assign it to myDeltaTime1 and myDeltaTime2.

Then you use myDeltaTime1 for things you do want to pause and myDeltaTime2 for things you don’t want to pause, and have your Time Manager only set myDeltaTime1 to 0 when pausing.

The Animator does have a way to specify your own update method, as outlined here:

(this is the kind of thing Line Renderer would need to operate independently of deltaTime. but it doesn’t have it.)