> For the complete documentation index, see [llms.txt](https://infinitypbr.gitbook.io/magic-pig-games/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinitypbr.gitbook.io/magic-pig-games/magic-time-local-time-scale/faq.md).

# FAQ

## My Awake(), Update(), OnEnable() methods aren't executing

The `MagicTimeUser` class uses various Unity lifecycle events, and they are virtual. Make sure that your subclasses which derive from `MagicTimeUser` are properly overriding the methods, and calling "Base".

```csharp
// --- MagicTimeUser.cs
protected virtual void Update()
{
    // NOTE: If this isn't firing, make sure you are not overriding Update in a subclass!!!
    
    HandleTransition();
}

// --- MyDerivedClass.cs (inherits from MagicTimeUser)
protected override void Update()
{
    // Generally call this first, and do checks like those below on each Update() if needed
    base.Update(); // This ensures that the Update() on the parent class is called

    if (!FullySetup) return;
    if (IsDead) return;
    
    // More Update() actions can go here...
}
```

## The TimeScale never changes, but I see it changing in the Inspector

When the TimeScale is set to transition over time, make sure you are not setting the value every frame. This can happen when you have a slider or other method that itself transitions from one value to another.

The `SetValue()` method will start the transition, and if it is called every frame, then the transition curve will resolve to the `0` position, which often may be a value multiplier of `0`, meaning the end result will not be modified.

If you want to utilize a slider or other transition external to the Transition values in the `LocalTimeScale`, set the Transition Duration to `0`. This will ensure that the value provided in `SetValue()` is set immediately.

<figure><img src="/files/ATtMb8t5hCaZRNlNaBTW" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://infinitypbr.gitbook.io/magic-pig-games/magic-time-local-time-scale/faq.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
