Custom Time Scale Solution

  • A* version: [5.3.8]
  • Unity version: [6.1]

I have developed a custom time scale script that allows me to change local time scale for the player, enemies, and UI all separately. The problem with this is that it just returns the regular Time.timeScale and multiplies it with my local time scale. This causes an issue in where the pathfinder won’t freeze if I turn the local time scale to 0. Is there any way to extend the follower entity script to use my local time scale instead?

Thank you!

I did some looking into files and stuff documentation but I’m not seeing where the actual simulation for higher timescales occurs or how. I’ll tag @aron_granberg and when he gets the chance he can let us know what the best way of doing this may be :+1:

Right now this is hard, but in the next beta version update you’ll be able to do this:

var aiMovementSystemGroup = Unity.Entities.World.DefaultGameObjectInjectionWorld.GetExistingSystemManaged<AIMovementSystemGroup>();
aiMovementSystemGroup.CustomTimeScale = 3.0;